![]() |
.htaccess redirect not workign when %20 is in old url
I am redesigned a site and setting up the .htaccess 301 redirects and noticed the old urls with spaces (%20) in them will not redirect.
All the others are redirecting correctly. Here is an example of one that won't work: Redirect 301 /contact%20us.htm http://www.mynewsite.com/contact.php Thoughts? |
Quote:
Code:
Redirect 301 http://www.mynewsite.com/contact\ us.htm http://www.mynewsite.com/contact.phpCode:
RewriteRule ^contact\ us\.htm$ http://www.mynewsite.com/contact.php [R=301,L]best regards |
Neither of those worked. The first one caused an error - even when I removed the full url in the first reference. The second just didn't redirect.
|
This should work
Code:
Redirect 301 "/contact us.html" http://www.mynewsite.com/contact.php |
WE HAVE A WINNER!! Thank you that worked perfectly!
Quote:
|
Option that Worked Also
I was running into the same problem. This is the solution that worked for me on http://www.mycollegesandcareers.com which we're running on an Ubuntu server.
Code:
redirectMatch 301 ^/careers[\s]/(.*)$ http://www.mycollegesandcareers.com/careers/$1Hope this helps someone else that is in the same boat as I was. |
| All times are GMT +1. The time now is 09:14 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.