Reputation: 31
I've got an URL like this www.mysite.it/indexa.php?pag=azienda
and an URL like
www.mysite.it/azienda
.
I've already read the other question and I've wrote in my .htaccess
this
RewriteEngine On
RewriteRule /([a-z]+)/ http://www.mysite.it/indexa.php?pag=$1 [R]
But it doesn't work.
Upvotes: 0
Views: 262
Reputation: 4363
Your rule /([a-z]+)/
accepts urls like those:
but not these ones:
Do you see the pattern? The trailing slash. Try this:
RewriteRule ^/([a-z]+)/? /indexa.php?pag=$1 [R,QSA]
Upvotes: 2