How can I rewrite
www.mysite.com/name/subject/
to
www.mysite.com/index.php?page=name&s=subject
?
Now I'm using:
Options +FollowSymLinks
Options +Indexes
RewriteEngine on
RewriteBase /
Don't match internal sub requests:
RewriteCond %{ENV:REDIRECT_STATUS} ^$
Match the query string variable:
RewriteCond %{QUERY_STRING} ^(.*&)?page=(name1|name2)(&.*)?$ [NC]
Match the file and redirect:
RewriteRule ^(index\.php)?$ /%2/? [NC,R=301,L]
RewriteRule ^(name1|name2)\/$ /index.php?page=$1 [QSA,L]
And it's working but only until www.mysite.com/name1/