Forum Moderators: phranque
redirect 301 /bookmarks/list/onecat/-Root%20Category-/*/ h_ttp://www.mydomain.com/bookmarks/list/onecat/Franchise_and_Business_Opportunity_Directory/
(I changed http to h_ttp for this post so it wouldn't hyperlink it)
I tried escaping the * and % with a "\" but it made no difference...
I've got about a hundred other redirects that work fine, I don't know why this one won't. I just "fixed" the urls a bit for my directory and want to point the old page to the new one. I don't care about the subcategories, google's going to have to re-index them all anyways. I just want it to know where to start.
google has my directory indexed as www.mydomain.com/bookmarks/list/onecat/-Root%20Category-/*/
Any ideas?
Thanks in advance!
-Jason
(I get in trouble every time I post an answer to a mod_alias question, because I never use it, so take everything I post with a grain of salt.)
**End Disclaimer**
Have you tried it with just a (space)?
I do not believe you will get very far with Redirect and escaping, because it does not support regex...
If you would like to keep using mod_alias you might have some luck with:
RedirectMatch 301 /bookmarks/list/onecat/-Root\ Category-/\*/$ h_ttp://www.mydomain.com/blah/stuff
OR
RedirectMatch 301 /bookmarks/list/onecat/-Root.Category-/\*/$ h_ttp://www.mydomain.com/blah/stuff
OR
You could always use mod_rewrite:
RewriteEngine on
RewriteRule /bookmarks/list/onecat/-Root\ Category-/\*/$ h_ttp://www.mydomain.com/blah/stuff [R=301,L]
Hope this helps.
Justin
tried RewriteRule /bookmarks/list/onecat/-Root\ Category-/\*/$ h_ttp://www.mydomain.com/list/onecat/Franchise_and_Business_Opportunity_Directory/*/ [R=301,L]
(with and without the "*/" at the end, no difference)
and it didn't do anything still...
RedirectMatch 301 /bookmarks/list/onecat/-Root\ Category-/\*/$ h_ttp://www.mydomain.com/bookmarks/list/onecat/Franchise_and_Business_Opportunity_Directory/*/
didn't work either, I even tried putting the %20 back in there instead of the space, and then tried escaping the "%" symbol, still nothing...
RedirectMatch 301 /bookmarks/list/onecat/-Root.Category-/\*/$ h_ttp://www.mydomain.com/bookmarks/list/onecat/Franchise_and_Business_Opportunity_Directory/*/
finally worked! I'm not really sure how "%20" turns into a "." but whatever, it worked!
THANK YOU!
-Jason
If using rewriterule,
show tha actual "space", but escape it with "\". Like this:
URL in Google shows as:
word1%20word2.htm
in rewriterule it looks like this:
word1\ word2\.htm$
( see the actual blank and the escape in front of it?)