homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

Setting .htaccess to redirect user from an odd URL for SEO sake
.htaccess redirecting

5+ Year Member

Msg#: 3367200 posted 8:31 am on Jun 14, 2007 (gmt 0)


I'm wondering if there's a code one can use to redirect users from a very odd URL that comes up in my CMS when one clicks on "Home".

When someone types:


They get there alright. But when they click on "Home", they are sent to an URL like that:


This is certainly not good for SEO sake as the page rank will get "diluted" in two URLs.

So how does one write a rule in a .htaccess file to redirect users from that page to the root URL - which is after all the same page anyway?

keywords: .htaccess, redirect, redirecting, URL, SEO



WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 3367200 posted 9:17 pm on Jun 14, 2007 (gmt 0)

As well as setting up a redirect for both search engines and users alike to follow, those that already have the "wrong" URL that is, you also need to hard code the link on your site to point to the "correct" URL. This is vital.

For the .htaccess code, see the Apache forum here. The "index file redirect" question is asked and answered on a fairly regular basis.


5+ Year Member

Msg#: 3367200 posted 9:54 am on Jun 15, 2007 (gmt 0)

Thanks g1smd,

I didn't realize I could find answers in the Apache forum, certainly my brain is getting hard coded into a jelly fish.

Thanks for the advice, will keep trying, even though I don't seem to get it to redirect for some reason. The .htaccess provided by this CMS is huge, so it could be something overriding the new RewriteRule I've set. No idea...


Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved