taith Posted March 10, 2009 Share Posted March 10, 2009 hey everyone i'm using the following mod rewrite, and it doesnt seem to be working 100% RewriteEngine on RewriteRule ^images/.*$ - [PT] RewriteRule ^jscripts/.*$ - [PT] RewriteRule ^(.*/.*)$ index.html?s=$1 [L] it works as long as the url is "http://url/whatever/" but if you leave out the first / on the first bit after the server... it treats it like a folder/file, and skips that rule... anyone know how to fix it? Quote Link to comment Share on other sites More sharing options...
premiso Posted March 10, 2009 Share Posted March 10, 2009 PHPFreaks mod_rewrite You may want to post it in the right section. Just something to look at, the index.html replacement has a / in it. Thus you must have it. If you make that optional, it "should" work. Quote Link to comment Share on other sites More sharing options...
Rodis Posted March 10, 2009 Share Posted March 10, 2009 Uhm you have to tell each line whant you want to change the url to best is to start with the longest first. in the case of image jscript you havent told it the original location here a short example. RewriteRule ^abonnement/(.*).html$ /abonnement.php?cat=$1 [L] RewriteRule ^reviews/(.*).html$ /reviews.php?review=$1 [L] RewriteRule ^vakantie.php/ /index.php?cat=vakantie [L] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.