Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Bug Reports
  3. www and non www

www and non www

Scheduled Pinned Locked Moved Bug Reports
5 Posts 2 Posters 544 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    srikken
    wrote on last edited by srikken
    #1

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

    thanks

    1 Reply Last reply
    0
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        srikken
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • arminunruhA Offline
          arminunruhA Offline
          arminunruh
          Global Moderator
          wrote on last edited by
          #4

          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”

          1 Reply Last reply
          0
          • S Offline
            S Offline
            srikken
            wrote on last edited by
            #5

            Yes i found it!
            Thanks, the site works perfectly now

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            I also code custom websites or custom Lay features.
            💿 Email me here: 💿
            info@laytheme.com

            Before you post:
            1. When using a WordPress Cache plugin, disable it or clear your cache.
            2. Update Lay Theme and all Lay Theme Addons
            3. Disable all Plugins
            4. 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:
            1. Post a link to where the problem is
            2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
            3. If the problem is difficult to explain, post screenshots / link to a video to explain it
            Online Users
            A
            alasdair17
            Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
            laytheme.com
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Recent
            • Tags
            • Popular
            • Users
            • Search