Reputation: 2444
I have a strange problem here.
I am using a directory script running off PHP.
The users have the option to type in their postcode so the directory can use their postcode to find local businesses.
I am using a session to save their postcode.
The problem is when the session postcode ($_SESSION['postcode']) doesn't show when I leave out the "www." in the domain. How can I set it so the postcode will show with/without the www.?
Thanks Peter
Upvotes: 0
Views: 114
Reputation: 2444
I used the following code and it worked :)
RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^www.mywebsite.org RewriteRule ^(.*)$ http://mywebsite.org/$1 [R=permanent,L]
Upvotes: 0