Jump to content

subdomain rewrite problem


burhankhan

Recommended Posts

Hi:

 

I am using the following .htaccess code for virtual sub domain, and it is working fine:

Options +FollowSymlinks

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www [NC]
RewriteCond %{HTTP_HOST} ^([^.]+)\.st-rt\.com [NC]
RewriteRule ^$ /page/index.php?id=%1 [L] 

 

It is redirecting username.domain.com to www.domain.com/page/index.php?id=username

 

But what to do for this:

username.domain.com/mail.php?id=23

 

I want it to redirect to : www.domain.com/page/pages.php?id=23

 

What to add in .htacess?

 

Thanks

Burhan Khan

 

 

Link to comment
https://forums.phpfreaks.com/topic/44109-subdomain-rewrite-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.