What I have is http://site.com/index.php?i=1
and want to work with:
- [1]
http://site.com/aboutand - [2]
http://site.com/about/(notice slash at the end)
I use following rules:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/?$ index.php?i=$1 [QSA,L]
And this works only for [1] but if I put / at the end it redirects to http://site.com
I tried different options but or I get not found or server error or works only one of those. Any idea?
If you want redirection for URI
/about/to/index.php?i=1then your rule should be:Not sure why you are match everything by using
(.*)there.