Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,811
    Thanks
    30
    Thanked 4 Times in 4 Posts

    Added 301 redirect to the www but isn't working

    Hi,

    I have read that we should decide whether the website should be www (dot) example.comor just example.com and redirect
    the one we don't want with 301 to the one we do want.

    I am happy to put it in my httpd.conf or on the .htaccess file.

    My website is www (dot) expressresponse.net

    I want to choose the example.com format.

    So, from what I have read, I should write this in the .htaccess file

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

    So this is NOW in the .htaccess file BUT if you look at the website

    BOTH expressresponse.net and www (dot) expressresponse.net are working .


    My httpd.conf file shows this:

    <VirtualHost 65.23.129.163:80>
    SuexecUserGroup "#547" "#511"
    ServerName expressresponse.net
    ServerAlias Best Free AutoResponder Business Website Customer List Builder.
    DocumentRoot /home/exp526d/public_html
    ErrorLog /home/exp526d/logs/error_log
    CustomLog /home/exp526d/logs/access_log combined
    ScriptAlias /cgi-bin/ /home/exp526d/cgi-bin/

    etc etc


    Can you see what I have done wrong ?

    Many thanks
    Last edited by jeddi; 07-31-2017 at 07:38 PM.
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •