sohaibshaheen Posted July 15, 2012 Share Posted July 15, 2012 Hi, I want to give users their own urls e.g. username.site.com for which I need to mod rewrite so username.site.com ::: points to site.com/profile.php?user=username (masked - no redirect) I have accomplished above thing already but I also want to point username.site.com/profile to point to site.com/profile.php?user=username , which I cannot accomplish somehow.. Here is what I have:: RewriteCond %{HTTP_HOST} !^(www\.)?site\.com [NC] RewriteCond %{HTTP_HOST} ^([^.]+)\.site\.com/?$ RewriteRule ^$ /profile.php?user=%1 [L] Please help me. Link to comment https://forums.phpfreaks.com/topic/265711-wildcard-subdomains-mod_rewrite/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.