Reputation: 456
My URL it's like this
http://domain.com/validar/api.php?desde=email&[email protected]
and i want to rewrite url's like this
http://domain.com/validar/email/[email protected]/
I thought this was the way
RewriteEngine On
RewriteBase /validar/
RewriteRule ^/([^/]*)/([^/]*)/$/api.php?desde=$1&que=$2 [L]
But i'm getting 404 and cant make it work
Any ideas? Thanks
Upvotes: 1
Views: 106
Reputation: 785128
Remove leading /
from your rule and don't get why you have mail/
in your target URI since it is not shown in your question.
Try:
RewriteEngine On
RewriteBase /validar/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/([^/]+)/?$ api.php?desde=$1&que=$2 [L,QSA]
Upvotes: 2