Subdomain redirection

New to mod_rewrite? This is a good place to start.

Postby Guest » Wed Jul 31, 2002 11:58 am

Please help!
I want to redirect all people from gg.domain.com to domain.com/file.php?i=3&n=7
I have 2 questions: how to do it and where to put .htaccess file(in the subdomain directory or in the main directory)?
I'm new user of mod rewrite and i can't do it myself.
Guest
 

Postby Brett » Mon Aug 05, 2002 1:59 pm

You can accomplish this by putting the following in an .htaccess file in the subdomain directory:
Code: Select all
RewriteEngine on
RewriteRule ^(.*)$ http://www.domain.com/file.php?i=3&n=7 [R]
Brett
 
Posts: 82
Joined: Tue Jul 10, 2001 4:00 pm
Location: yohost.com


Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 121 guests

cron