burhankhan Posted March 24, 2007 Share Posted March 24, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.