Forum Moderators: phranque
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
redirect 301 / http://www.mywebsite.tld/dir/ http://www.mywebsite.tld/dir/index.html?q=dir/index.html which does not exist RewriteEngine on
RewriteRule ^(.*)$ http://www.mywebsite.tld/dir/index.php?q=$1 [L] which redirects to http://www.mywebsite.tld/dir/index.php?q=pagename.html which works, but is not a pretty url (possibly i need to add some lines in htacces of the redirect site to fix). www.mywebsite.othertld RewriteEngine on
RewriteRule ^(.*)$ http://www.mywebsite.tld/dir/index.php?q=$1 [L] redirects to http://www.mywebsite.tld/dirpagename.html without the / after dir RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] http://www.mynewwebsite.tld/dir just work!