umairmasood Posted November 23, 2010 Share Posted November 23, 2010 Hello, Here is what my .htaccess contains: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^.* list.php Now this is the code which is using the keyword "How-I-Met-Your-Mother" in the url http://www.dontwatchvideo.com/How-I-Met-Your-Mother/ to show the relevant videos based on the keyword. It is being done by sending the keyword "How-I-Met-Your-Mother" to a .php page (using $_Get) on my site to process the videos for this keyword. But if I goto http://www.dontwatchvideo.com/How-I-Met-Your-Mother the page shows no videos. No keyword is passed to the $_Get paramater if the trailing slash "/" is not added to the end of the url. Please tell me how to edit the line RewriteRule ^.* list.php so that it works without trailing slash "/" Please let me know. Thnx Quote Link to comment https://forums.phpfreaks.com/topic/219523-mod-rewrite-trailing-slash-question/ Share on other sites More sharing options...
umairmasood Posted November 23, 2010 Author Share Posted November 23, 2010 anyone? Quote Link to comment https://forums.phpfreaks.com/topic/219523-mod-rewrite-trailing-slash-question/#findComment-1138407 Share on other sites More sharing options...
adrianTNT Posted December 1, 2010 Share Posted December 1, 2010 I am not sure if there is a better solution but on my server I write another rule with the slash at the end, it works to add it in same rule by writing (/)? at the end, I think it is like this for your rule: RewriteRule ^.*(/)?$ list.php Unless others have better ideas Quote Link to comment https://forums.phpfreaks.com/topic/219523-mod-rewrite-trailing-slash-question/#findComment-1141833 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.