Keniki Posted March 9, 2007 Share Posted March 9, 2007 Hi I am trying to achieve the following What I want to do is redirect a directory from a double slash to a single slash. For instance www.yoursite.com//directory/ Redirected to www.yoursite.com/directory/ Or www.yoursite.com/directory//directory2/ Redirected to www.yoursite.com/directory/directory2/ I keep sending apache into a loop when trying this. Any help gratefully recieved. Link to comment https://forums.phpfreaks.com/topic/41884-double-slash-to-single-slash/ Share on other sites More sharing options...
wildteen88 Posted March 9, 2007 Share Posted March 9, 2007 Apache does that for me automatically. You shouldn't have to modify the configuration to make it do that. Make sure the mod_dir module is loaded - this should be enabled my default in the httpd.conf Link to comment https://forums.phpfreaks.com/topic/41884-double-slash-to-single-slash/#findComment-203648 Share on other sites More sharing options...
Keniki Posted March 11, 2007 Author Share Posted March 11, 2007 Thankyou, thats excellent :) I'll talk to my host on monday and get this sorted on monday. Thanks again wildteen88 Link to comment https://forums.phpfreaks.com/topic/41884-double-slash-to-single-slash/#findComment-204568 Share on other sites More sharing options...
Keniki Posted March 13, 2007 Author Share Posted March 13, 2007 Hi thanks for your help but this in the end did not solve the problem. The following provided by my most excellent host proved to be the final answer (they don't normally do this).... RewriteCond %{REQUEST_URI} // RewriteRule ([^/]*)/+(.*) http://www.exampledomain.com/$1/$2 [R=301,L] Host is Rackspace Link to comment https://forums.phpfreaks.com/topic/41884-double-slash-to-single-slash/#findComment-205971 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.