Ik heb een klein vraagje..
Hoe kan ik bv van
http://www.google.nl/subsite
http://subsite.google.nl
maken?
Kan dit met .htaccess?
1.042 views
RewriteEngine On
# Extract the subdomain part of domain.com
RewriteCond %{HTTP_HOST} ^([^\.]+)\.website\.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.website.com/profile.php?username=%1 [R,L]RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^\.]+)\.localhost:8080\com$ [NC]
RewriteCond %1 !^(www|ftp|mail)$ [NC]
RewriteRule ^.*$ http://www.website.com/profile.php?username=%1 [R,L]