Author Topic: Redirect non-www to www domain  (Read 4289 times)

0 Members and 1 Guest are viewing this topic.

Offline uploadeur

  • Newbie
  • *
  • Posts: 47
    • View Profile
Redirect non-www to www domain
« on: April 23, 2012, 03:19:22 PM »
If you want to redirect all non-www requests to your site to the www version, all you need to do is add the following code to your .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

but when i do this xxx.com/picture.html returns to www.xxx.com/details=php? etc...

how can i protect the real permalink of a page?

Offline uploadeur

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Redirect non-www to www domain
« Reply #1 on: May 08, 2012, 01:06:24 AM »
up

Offline uploadeur

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Redirect non-www to www domain
« Reply #2 on: September 24, 2012, 08:14:12 AM »
up!