SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2010
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    htaccess and 301 redirect - assistance

    Ok,

    Unsure if this is the correct thread however need some assistance, we rarely use htaccess codes and can not properly configure it by tutorials on google.

    Here is the issue.

    Site

    http://sitename.com
    and
    http://www.sitename.com

    go to the same place,

    this needs to happen

    http://www.sitename.com
    points to
    http://sitename.com


    the site is located at http://sitename.com

    due to how some systems had to be set up. Anyone willing to provide the code?

    Here is what we have thus far:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://sitename.com/ [R=301,L]

    Thanks for your assistance, it is greatly appreciated!

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    z,

    The force non-www code is linked as an example in the tutorial in my signature.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

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