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. Quote Link to comment https://forums.phpfreaks.com/topic/265711-wildcard-subdomains-mod_rewrite/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.