Forum Moderators: phranque

Message Too Old, No Replies

Double forward slash at end of redirected URL

         

Marcia

12:36 pm on Nov 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nope, not asking how to fix it, I was moving files and just made it happen so thought I'd share what I did so if anyone's running into it, it's something to check out in .htaccess

To see what would happen, I removed the trailing forward slash at the end of the directory being redirected to another so it looked like this

Redirect 301 /huge-widgets http://www.example.com/tiny-widgets/

Wrong. A double forward slash in the /tiny-widgets// directory is what I got, and all the images were broken, too. Put it back like it's supposed to be

Redirect 301 /huge-widgets/ http://www.example.com/tiny-widgets/

Back to normal, working like it should. I also killed the previous directory in hopes that it won't be in the Supplemental Index if the directory is gone altogether.

jdMorgan

3:12 pm on Nov 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The good news is that double-slashes are largley ignored by servers, so these requests would be honored as valid and content would be served if they did get indexed and requested from search results. In this case, you could 'redirect them back' to the proper directory without the double-slash.

Jim