Jump to content

htaccess help.


Guest RAWRoutLOWD

Recommended Posts

Guest RAWRoutLOWD

Hi, I was wondering if anyone could help me out.

I'm trying to figure out how to get my url (http://www.example.com/store/) to always 301 redirect to the www version as opposed to the non-www version. The problem seems to lie in the fact that I activated the SEO option in general settings, and the "install .htaccess" command overrides my own. How would I get it so that my www.example.com/store/ always accesses the www version while having the SEO setting activated? I can't seem to find the htaccess file so that I can edit it. My knowledge of htaccess is very limited, so I'm a little dumbfounded right now.

Thanks in advance,

Ray

Link to comment
Share on other sites

Hi Ray,

Edit .htaccess in a text editor.

Below "RewriteEngine On"

Paste;

RewriteCond %{HTTP_HOST} !^www\.

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

Save and upload.

Visit the non WWW version of your site, and you will be forced to the WWW version.

This will force a 301 (Permanent Redirect) to the www version of the page.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...