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 / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Redirect index page
Need help with just redirecting one page

5+ Year Member

Msg#: 6352 posted 5:32 pm on Jun 5, 2006 (gmt 0)

I have been searching on how to do this for about an hour so I am sorry if this is a repetitive question.

I have no experience with how to do a redirect with a .httaccess but have a friend who wants just their index page www.example.com redirected to www.subdomain.anotherexample.com (a different site with a subdomain).

They want to link this subdomain to other pages of their exmaple.com site as well (kind of confusing but there is a reason for it).

So I only need the index page forwarded and not any other pages of the site.

Can anyone help me with this or show me the correct place to go? Thanks!



WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 6352 posted 7:36 pm on Jun 5, 2006 (gmt 0)

[url=http://httpd.apache.org/docs/1.3/mod/mod_alias.html#redirectmatch]RedirectMatch[/url] 301 ^/$ http://www.subdomain.other_example.com

is the simplest method, although in this case, you are redirecting to a sub-subdomain. That is, "www" is a subdomain of "otherexample.com," and that's a fairly ugly URL... If there's no really good reason for it, I'd suggest redirecting to "subdomain.other_example.com" instead. Note that in "www.example.com" the "www" is a subdomain of "example.com," which is the domain. There is nothing special about "www" -- It is just a subdomain like any other.



5+ Year Member

Msg#: 6352 posted 8:47 pm on Jun 5, 2006 (gmt 0)

it does not need the www so thanks for the information. This helps me a ton. Thanks!

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.
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