![]() |
.htaccess Q -- redirect subdomain page to main domain page
How do I use .htaccess 301 redirect to
Redirect a subdomain page to main domain page? I have a bunch of pages on sub-domain page i need to redirect individually to different pages. :helpme |
Code:
RewriteCond %{HTTP_HOST} !^sub\.domain\.com |
Quote:
thx for the attempt though spacedog. |
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.domain\.com RewriteCond %{HTTP_HOST} ([^*]+)\.domain\.com [NC] RewriteRule ^(.*)$ script.php?x=%1 [NC] where %1 will be everything before .domain.com so if its one.two.three.domain.com it will go to domain.com/script.php?x=one.two.three |
horrible examples :p
|
Quote:
|
All times are GMT -7. The time now is 07:51 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123