Jump to content

Redirecting from www to URL without www but on all pages not only home page.


Recommended Posts

Hi to all,

 

This is rather small issue but I would like to see if I can resolve it easily...

 

Thing is my webshop URL is: dekom.co.rs

 

So I don't use www prefix.

 

When I type www.dekom.co.rs into my browser it redirects me to dekom.co.rs which is all good.

If I browser in the other hand, to some product page or CMS page whatever, and manually add www. prefix, hit enter, I will got 404 page instead of redirecting.

 

Example page:

http://dekom.co.rs/c...vina-i-placanje

 

Can this be fixed somehow so all pages redirect to their exact copies just without www.?

 

Thank you

Dean

Link to comment
Share on other sites

You can realize this by two ways. In .htaccess or directly on the DNS-Panel of your Domain.

 

DNS - Please ask your domain administrator

 

.htaccess -

 

RewriteCond %{HTTP_HOST} ^www.yourdomain.com$ [NC]
RewriteRule ^(.*) http://yourdomain.com$1 [R=301]

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...