www and non www
-
Hi
If I go to my site without a www. in front, the links on the home page wont work, the photo links in this case.
If i go to my site with www. in front the links do work.I found on the internet that i have to redirect my non www to my www. Therefore i need to create a rewrite rule (below).
But I have no idea where to put that code in laytheme or Wordpress.
Can somebody please tell me?The Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]And my site:
www.polyvorm.nlthanks
-
hey srikken!
If you log in to your webhost you can manage your domains there. In my webhost you can set if you want www or not here. Maybe you have a setting like that too.
Or maybe you can redirect http://www.yourdomain.com to http://yourdomain.com there. -
Hi Arminunruh
I Asked my webhost but they gave me the same solution. To put that code (below) in my .htaccess , it doesn't matter where as long as its in there.
Can you tell me how i get to the .htaccess?The Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.yoursite.com
RewriteRule (.*) http://www. yoursite.com/$1 [R=301,L]I already have my wordpress address and site address set to the www. version
Thanks.
-
hey the .htaccess should be in the folder where your website is on your ftp. its a hidden file so if u use filezilla follow this: Make sure you can see hidden files: In the menu of FileZilla go to “Server” and activate “Force showing hidden files”
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it