Ok so i have hosting with godaddy and i have 2 websites hosted with them. I make a htaccess rule and add it into my main dir and it effect both domain names. Im just wondering if there anything i can add to it to only work for the one domain name ?? My mod rewrite rule is has follwed
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)_ index.php?pageid=$1
When i add this to my main dir it effect both websites i have hosted. The rule ment to be changing this mysite.com?index.php to this mysite.com/index_
But has i have said i need to some how set a domain name in side it some how.
Add this line before your RewriteRule
RewriteCond %{HTTP_HOST} ^www.mydomainname.com$
Your rule will affect only this domain, your .htaccess should look like this :
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.mysite.com$
RewriteRule (.*) /index.php?pageid=$1
This would match
http://www.mysite.com/week1
and rewrite it to
http://www.mysite.com/index.php?pageid=week1
Then you can access $_GET['pageid']
to get the value