Basically ive made it so when a user registers they get thier own profile page and can access it by typing dynamicuser.domain.com instead of domain.com/user/dynamicuser.php
This is my .htaccess code
- Code: Select all
RewriteEngine On
# Extract the subdomain part of domain.com
RewriteCond %{HTTP_HOST} ^([^\.]+)\.tutorialwave\.com$ [NC]
# Check that the subdomain part is not www and ftp and mail
RewriteCond %1 !^(www|ftp|mail)$ [NC]
# Redirect all requests to a php script passing as argument the subdomain
RewriteRule ^.*$ http://www.tutorialwave.com/profile.php?username=%1 [R,L]
The problem is that when the user is redirected to thier profile page it shows the URL domain.com/user/dynamicuser.php instead of dynamicuser.domain.com
Any ideas would be appreciated
Thanks