homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

This 31 message thread spans 2 pages: < < 31 ( 1 [2]     
redirecting subdomain to subfolder

5+ Year Member

Msg#: 4500118 posted 10:42 am on Sep 26, 2012 (gmt 0)

I am updating a site of mine and would like to redirect a fair few subdomain URL's to subfolders.

Here's an example of whats currently setup.


I would like to forward them to


The folders are going to be setup with the correct names. The problem is, how to do this via .htaccess redirects without writing each one out individually.

The random numbers at the end of the subdomain URL's are probably going to cause a pain but there's nothing I can do about them.

I could write them all out, but that would make for a very large .htaccess file - unless that's the only way to do this?



5+ Year Member

Msg#: 4500118 posted 2:07 pm on Oct 3, 2012 (gmt 0)

Hi, I also need to do this in a Plesk control panel environment, and the above convo is a bit confusing for me to follow. Here's my situation.

example.com is the main domain
sub.example.com is the subdomain I want to redirect to example.com/newdirectory

The structure is that the subdomain is in a directory under the main domain in the root directory (i.e. the directory that contains httpdocs.cgi-bin, etc.

The address bar should reflect the NEW (redirected TO) info.

Should be simple?

This 31 message thread spans 2 pages: < < 31 ( 1 [2]
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