CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Nov 2005
    Posts
    135

    rewrite htaccess for specific uRL?

    I have some domains that all point to the same backend folder. However, I would like to keep the URL the same.
    For example, if someone accesses mysite.com or mysite.eu or mysite.net they will remain within that domain the entire time.

    ANy idea show to change this and will that mess up any sessions?

    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^(www\.mysite\.co\.uk)?$
    RewriteCond $1 !^cart/updateorders\.php$
    RewriteCond $1 !^IntegrityCheck\.php$
    RewriteRule ^(.*)$ http://www.mysite.co.uk/$1 [R=302,L]
    I also have this as the index.php page but I'm not sure if the htaccess bypasses it? I was told it was better to have this for Google listings.

    PHP Code:
    <?php
    header
    "HTTP/1.1 302 Temporarily Moved" );
    header('Location: [url]http://www.mysite.co.uk/cart/index.php');[/url]
    ?>
    Last edited by PeejAvery; August 8th, 2011 at 07:09 PM. Reason: Added code and php tags.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured