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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    htaccess rewrite to replace domain

    Thought this would be simple but nothing I've tried is working. We built this wordpress site. Before it went live, it got indexed so I'm getting the following:

    http://s152979.gridserver.com/recent_projects/

    When I want to see:
    http://www.neponsetvalleyconstructio...cent_projects/


    The site works but we would like to have the second url display even if viewer has come in through the first link. I've been trying to work the htaccess file but NOTHING I've tried works. This is the last suggestion that was made to me. It also doesn't work. Does anyone know how to do this?

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} s152979.gridserver.com/ [NC]
    RewriteRule ^(.*)$ http://www.neponsetvalleyconstruction.com/$1 [R=301,L]

  • #2
    New Coder
    Join Date
    Jun 2008
    Location
    Detroit, MI
    Posts
    11
    Thanks
    0
    Thanked 1 Time in 1 Post
    For the general settings on the admin screen what do you have in WordPress Address (URL) & Site Address (URL)?

  • #3
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Neither site is coming up at the moment. Try removing the slash from the end of your RewriteCond and make sure you have your site URLs updated as kelisaid mentioned.


  •  

    Posting Permissions

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