Jump to content

PHP www.


dizzy1

Recommended Posts

  • 2 weeks later...

If you don't use sub-domains you could go for something like this...

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www
RewriteRule .* http://www\.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

 

...or you could try...

 

RewriteEngine On

RewriteCond %{HTTP_HOST} ^mydomin.com
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]

 

...or any number of other solutions depending on the exact situation.

Link to comment
https://forums.phpfreaks.com/topic/240107-php-www/#findComment-1237584
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.