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. Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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 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.