Jump to content

stupid problem :(


mikey3521

Recommended Posts

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.?

Link to comment
https://forums.phpfreaks.com/topic/136861-stupid-problem/
Share on other sites

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]

Link to comment
https://forums.phpfreaks.com/topic/136861-stupid-problem/#findComment-715722
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.