HELP! Htaccess (www) help! (3 posts)

  1. gameboyz
    Posted 7 years ago #

    Okay here's the deal.

    I have a directory (gameboyz.net/directory) and I want to set up my htaccess such that gameboyz.net gets redirected to http://www.gameboyz.net BUT gameboyz.net/directory DOES NOT get directed. In fact, if http://www.gameboyz.net/directory is entered it will be directed to gameboyz.net/directory.

    I added this `RewriteCond %{HTTP_HOST} ^gameboyz.net
    RewriteRule (.*) http://www.gameboyz.net/$1 [R=301,L]` to the ".htaccess" in the root folder. When I enter gameboyz.net into the address bar, sure enough at the status bar below the "www." appears in front. Then it dissapears, and appears again. Then Firefox gave me an error saying it is a never-ending loop. Okay, so I tried with my /directory which is a Joomla installation. It works like a charm.

    So I'm guessing there is SOME code inside the .htaccess file for WordPress that is conflicting with the code to make the www appear. What is it and how do I fix it?


  2. Samuel B

    Posted 7 years ago #

  3. On your WordPress site, what are the values on the Settings->General screen set to? Those URLs probably don't have the www, do they?

    Also, you don't need an htaccess change for this. WordPress redirects wrong URLs to the correct one, based on its own settings.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.