martinf
03-05-2007, 09:59 PM
Having a bit of a hard time to come up with a way to do this.
The rewrite works, but instead of outputting http://www.domain.com/page.php?val=something I want it to display http://something.domain.com only. And, I also want it to only apply to page.php when val is set (if possible) and links on that page should be http://www.domain.com/tralala (if possible).
I'm right now using:
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com
RewriteRule ^(.*)$ http://www.domain.com/page.php?val=%1 [L]
Thankful for any help you can give me!
The rewrite works, but instead of outputting http://www.domain.com/page.php?val=something I want it to display http://something.domain.com only. And, I also want it to only apply to page.php when val is set (if possible) and links on that page should be http://www.domain.com/tralala (if possible).
I'm right now using:
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com
RewriteRule ^(.*)$ http://www.domain.com/page.php?val=%1 [L]
Thankful for any help you can give me!