BeachnGrub Posted February 23, 2005 Share Posted February 23, 2005 We moved our site to the level below /catalog but when you click on a link from google that has /catalog/example+session ID, it gives an error We setup a htaccess redirect file as follows.. RedirectMatch permanent ^/catalog$ http://www.ourstore.com However when you click on a link like this.. www.ourstore.com/catalog/about_us.php?osCsid=ak6ce3434ac034a2351d97te3e453ae32 it shows a page could not be found.. if you copy and paste the above link without the catalog portion and put it into a browser, it will work just fine. anyone understand htaccess that can help out? Link to comment Share on other sites More sharing options...
BeachnGrub Posted February 24, 2005 Author Share Posted February 24, 2005 could anyone look at this and tell me whre I am going wrong? Our host is saying that there is no way to do this but I have done thsi several other times with other systems.. Link to comment Share on other sites More sharing options...
stevel Posted February 24, 2005 Share Posted February 24, 2005 I think what you want instead is: RedirectMatch permanent /catalog/(.*)^ http://www.ourstore.com/$1 I'll admit to being somewhat fuzzy on all these regexp strings, but the one you have just can't possibly be right. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Sincraft Posted February 24, 2005 Share Posted February 24, 2005 Just did this - steve almost had it.. it's: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^catalog/(.*) http://www.example.com [R=301,L] </IfModule> This will send people coming from any url after catalog/ back to the url of your choice, mine being my main page. This is an absolutely critical rule for people to place in their roots htaccess file if they have had their site up for more than a couple weeks and are moving down to the root level from /catalog...otherwise the SEs will find many page could not be founds and penalize you. Your ranking will drop like a rock. S Link to comment Share on other sites More sharing options...
stevel Posted February 24, 2005 Share Posted February 24, 2005 I see I had the regex syntax a bit off, but I am a bit uncomfortable with redirecting all "old" links back to the main page. This will lose any PR you had for the old pages and may cause problems based on multiple pages seemingly redirected to the same page. It would be better to do a 301 redirect to a rewritten URL that goes to the correct new page, rather than the home page. That will maintain the PR and simply tell the search engines to update the URL in their index. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.