This is the URL
http://www.example.com/main/index.php?p=test
I want it to become this
http://www.example.com/test
My current .htaccess looks like this
RewriteOptions inherit
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^template\/?(.*)$ "http\:\/\/www\.example\.com\/$1" [R=301,L]
RewriteCond %{THE_REQUEST} \s/+index\.php\?p=([^\s&]+) [NC]
RewriteRule ^ /%1? [R=302,L]
RewriteRule ^([^./]*)/?$ /index.php/?p=$1 [L,QSA]
With these rules i only get this at the end
/main/
I have tried many other Rewrite Rules but this rule seems to be the closest i can get.
MY FIX
RewriteEngine On
RewriteRule ^([^/]*)\/$ /main/index.php?p=$1 [L]
It does not do exactly what i wanted but i is a close as i can get and work. Instead of seeing http://www.example.com/main/index.php?p=test we see http://www.example.com/main/test/ Was hoping for /test but /test/ will do. I also have to have this in each sub folder and change /main/ to the folder name, but that is automated so i am not that worried about it Thank you all for your help.