www.webdeveloper.com
Results 1 to 2 of 2

Thread: 301 Redirection

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    1

    301 Redirection

    Hi i have a Canonical issues on the home page what is need to done in order to solve this issue.

    http://domain.com/
    www.domain.com/
    http://www.domain.com/index.html
    domain.com/

    If anyone try from any of the link from above it should redirect to http://www.domain.com/ how we can do this in html. The redirection should be 301.

    Thanks,
    Sathish.

  2. #2
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    If you're running apache with mod_rewrite, you could use something like this:
    Code:
            RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com$ [NC]
            RewriteRule ^(.*)$ http://www.yourdomain.com$1 [R=301,L,NE]
    ... in your httpd.conf file, of course. This should also work from within the .htaccess file.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles