I would rewrite a very simple url
http://localhost/?page=me
to
http://localhost/me
I have try this in my .htaccess:
RewriteRule ^([^/]*)$ /?page=$1 [L]
But not work (error 500).
And like this, it work:
RewriteRule ^([^/]*)/$ /?page=$1 [L]
but the link is http://localhost/me/, i want remove the last /
an idea?
You need to add some conditions to prevent the rewrite engine from looping. Try this:
Unlike the second rule where the URI matched is always non-empty, the
/won’t get matched again and continue to loop.