mikey3521 Posted December 13, 2008 Share Posted December 13, 2008 I've got an IFRAME with some js code, some advanced calls from other sites etc, and I just found out it's not working for half my users. After going through the code 100x times I realized it's the same domain policy. Problem is some of my users are using http://sitename.com and others are using http://www.sitename.com , and it only works for one. Is there a way that anytime my users are going to http://sitename.com it will auto add in the www, or just quickly redirrect them to the same address they typed + the www.? Quote Link to comment https://forums.phpfreaks.com/topic/136861-stupid-problem/ Share on other sites More sharing options...
mikey3521 Posted December 13, 2008 Author Share Posted December 13, 2008 or the other way around, strip all www's. .. please advise.. Quote Link to comment https://forums.phpfreaks.com/topic/136861-stupid-problem/#findComment-714765 Share on other sites More sharing options...
JonnoTheDev Posted December 15, 2008 Share Posted December 15, 2008 Place the following in your http.conf virtualhost container for the domain or in a .htaccess file Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^sitename\.com RewriteRule ^(.*)$ http://www.sitename.com/$1 [R=permanent,L] Quote Link to comment https://forums.phpfreaks.com/topic/136861-stupid-problem/#findComment-715722 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.