Forum Moderators: phranque

Message Too Old, No Replies

Net .htaccess help - Please Help

How to create the .htaccess file for using a subdomain

         

menasim

12:28 pm on Mar 9, 2008 (gmt 0)

10+ Year Member



Friends,

I am looking for help in creating the following action with my domain. I want to redirect the subdomain name to the following:

Lets assume the subdomain is

abcd.webmediaportal.com

So it should redirect the user to

[webmediaportal.com...]

Please help me creating this as I am really looking for help regarding this.

I really appreciate your help.

Thanks in advance.
Nasim

gergoe

1:31 pm on Mar 9, 2008 (gmt 0)

10+ Year Member



Check out this recent thread [webmasterworld.com], for general information on this topic (rewriting 'subdomains' into various url's within one website). Since you don't seem to have access to the server configuration, you will need to check few things with your host first (DNS setup, Apache VirtualHost configuration), and if that works out well, you'll need to slightly adjust the rules mentioned in that post, so it will work in .htaccess context (remove the leading slashes from the regex patterns), and change the replacement into the desired one (something like /member.php?member=%1).

If the mentioned thread does not help you enough to get started, you can search with your favorite search engine for keywords like htaccess rewrite subdomain mod_rewrite RewriteCond HTTP_HOST.