Forum Moderators: phranque
What I want is:
Some one types
http://www.[sub].mydomain.com/pagename.php
Internal redirect to:
http://www.mydomain.com/script.php?uid=[sub]&page=pagename.php
So far I've got the sub domain part to work. This is my rewrite so far:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.([a-z0-9]+)\..+\..*$ [NC]
RewriteRule ^(.*)$ /home/siteid/public_html/script.php?uid=%1&page=%2
ErrorDocument 404 /index.php
What else do I need to capture the filename aswell? I'm a bit stuck now.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.([a-z0-9]+)\..+\. [NC]
RewriteRule ^(.*)$ /home/siteid/public_html/script.php?uid=%1&page=[b]$1[/b]
Jim