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
    Saz
    Saz is offline
    Regular Coder
    Join Date
    Jun 2005
    Posts
    277
    Thanks
    5
    Thanked 0 Times in 0 Posts

    301 from one address without .com to one with .com ?

    Been trying to find an answer on the net somewhere, but have not been able to.

    ok, if you wanted all hits on :

    http://www.websitename/pagename

    to go to

    http://www.websitename.com/pagename/

    and you didn't want to upset any search engines and not lose any pr, how would you do it please ?

    Any help appreciated.

    Saz.

  • #2
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How would http://www.websitename/pagename work without a TLD? I posted in another thread:

    I haven't actually tested this, but from this mod_rewrite guide I think you would want to use:

    Code:
    RewriteRule http://www.yourdomain.com/?redir=(.*) $1 [R=301,L]
    Let me know if this works for you, if not we can try something different.
    Which you could adapt sort of like:

    Code:
    RewriteRule http://www.websitename/(.*) http://www.websitename.com/$1

  • #3
    Saz
    Saz is offline
    Regular Coder
    Join Date
    Jun 2005
    Posts
    277
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Many thanks Charles, that's worked a dream - cheers.

    One last thing, to redirect a user from a particular IP address to another page on the same website, I'm trying :
    RewriteEngine on
    RewriteCond %{REMOTE_ADDR} ^92\.53\.62\.24$ [OR]
    RewriteCond %{REMOTE_ADDR} ^24\.151\.467\.151$
    RewriteRule ^(.*)$ http://www.websitename.com/folder/index.php [L]

    But, it's not working ? ?

    Any help appreciated.

    Saz


  •  

    Posting Permissions

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