hello, I am trying for 2 hours now. i could not get this working. How can i turn this url: http://localhost/tv.php?page=$1 to http://localhost/tv/index-1.htm thanks
try this one <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?/$1 [QSA,L] </IfModule> don't forget to activate mod_rewrite
it did not work. When i do this it works RewriteRule ^tv-(.*)\.htm$ tv.php?page=$1 [QSA,L] PHP: http://localhost/tv.php?page=$1 to http://localhost/tv-1.htm but when i do this it does not work http://localhost/tv.php?page=$1 to http://localhost/tv/index-1.htm RewriteRule ^tv/index-(.*)\.htm$ tv.php?page=$1 [QSA,L] PHP:
This works fine for me (looks like you needed a slash before tv.php but without it worked also on windows for me): RewriteEngine On RewriteRule ^tv/index-(.*)\.htm$ /tv.php?page=$1 [QSA,L] Code (markup):
Some ppl would so be stuffed without these forums. Modrewrite is a big learning curve for something so simple.