i have a community scripy running , it uses a verry extensive mod_rewrite. But i want to add a rewrite rule so people can access there profile trough a subdomain link.
http://domain.nl/xxx/ -> http://xxx/domain.nl (xxx = username)
http://domain.nl/xxx/ <- is already rewriten by mod_rewrite.
- Code: Select all
RewriteRule ^([A-Za-z0-9]+)(\/)?$ profile/index.php?profile_name=$1
RewriteRule ^([A-Za-z0-9]+)\/profile(\/)?$ profile/index.php?profile_name=$1
RewriteRule ^([A-Za-z0-9]+)\/tags(\/)?$ search/personaltags.php?profile_name=$1
RewriteRule ^(([A-Za-z0-9])[A-Za-z0-9]+)\/rss\/?$ _rss/static.php?username=$1&userref=$2&type=profile
RewriteRule ^([A-Za-z0-9]+)\/rss\/(.+)\/?$ profile/rss2.php?profile_name=$1&tag=$2
The code below i found here on the forum, and as far as i can say it works.
- Code: Select all
RewriteCond %{HTTP_HOST} ^(www\.)?mijnblogonline.nl\.nl$ [NC]
RewriteRule ^/([^/]+)(/(.*))?$ http://$1.mijnblogonline.nl/$3 [R=301,L]
But now the problem when i go to xxx.domein.nl it redirects me to my hosting provider.
I checked my DNS and there is a "A" record wich points to *.domein.nl.
I asked my provider if they could do something for me but i still didnt got a answer. (6 weeks ago )
So i hope its possible what i want and that you can point me in the right direction.
THNX