Home How to rewrite an url with two query inside to one folder?
Reply: 0

How to rewrite an url with two query inside to one folder?

user1315
1#
user1315 Published in June 24, 2018, 3:10 am

I'm facing a problem to transform my actual url

http://website.com/login/profil.php?id=34&pseudo=robin

into this one :

http://website.com/myspace

I checked if the rewrite engine works well and it's ok so that's my .htaccess

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$ 
RewriteCond %{QUERY_STRING} ^&pseudo=([a-zA-Z0-9]+)$ 
RewriteRule ^myspace\$  http://website/login/profil.php?id=$1&pseudo=$2  [R=301,L]

So my wish is to redirect the user's space on one common directory. what's the best way do do this ? am i wrong with the query ?

Thanks in advance guys !

This code doesn't work :

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteRule ^test\.html$ /profil.php?id=([0-9]+)&pseudo=([a-z]+) [L]

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.318223 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO