homepage Welcome to WebmasterWorld Guest from 54.237.95.6
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Redirect complex URLs to Homepage
mod rewrite rule to redirect to site root
SmartMoney




msg:3374084
 12:09 am on Jun 21, 2007 (gmt 0)

I've recently migrated a site from ASP.net to WordPress and I am getting a bunch of 404 errors because I used to have an "email this page" link on all my pages which does not exist on the new site.

Apparently these pages were all indexed and now I'm getting the errors when the search bots revisit the site.

What I am thinking of doing is to just redirect all these requests to the site root.

Is this an okay idea?

And if yes, given this is a typical URL

domain.com/EmailPage.aspx?StoryID=467

how can I construct a rule for my .htaccess file that will redirect to domain.com.

When I tried it myself I got

domain.com/?StoryID=467

as the result, which I think is a bad idea since it may be seen as duplicate content to my home page.

Thanks for any help,

SM

 

jdMorgan




msg:3374122
 1:20 am on Jun 21, 2007 (gmt 0)

If you used a RewriteRule, add a "?" to the end of the substitution URL to clear the query string.

Jim

SmartMoney




msg:3375002
 7:00 pm on Jun 21, 2007 (gmt 0)

Thanks Jim,

Your tip worked like a charm.

SM

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved