php - htaccess need name in front of domain
230
So i have a file named page.php, which has 2 get variables. the u and edit so at the moment i have
mysite.com/page.php?u=dan &
mysite.com/page.php?u=dan&edit
But how can i make the url look like this using htaccess?
dan.mysite.com &
dan.mysite.com/edit
At the moment i have tried this
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ page.php?u=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ page.php?u=$1
but this just makes
mysite.com/dan
Answer
Solution:
If I understand your requirement correctly, you can use: