• Home
  • Programming
    • API
      • Google
    • Javascript
    • Php
    • Server
  • CMS
    • Magento
    • Yahoo! Store

.htaccess redirect from one site to another while maintaining the directory structure

Friday, 29 March 2019 14:07
Tim Ramsey
0 Comments
1
2
3
4
5
6
//Optional Keep Magento admin on the same url
RewriteCond %{REQUEST_URI} !^/(admin)
RewriteCond %{REQUEST_URI} !^/index.php/(admin)
 
RewriteCond %{HTTP_HOST} ^www.oldstore.com$ [NC]
RewriteRule ^(.*)$ https://www.newstore.com/$1 [L,R=301]
This entry was posted on Friday, March 29th, 2019 at 2:07 pm and is filed under Programming, Server. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply

Cancel Reply

You must be logged in to post a comment.

Categories

  • CMS
    • Magento
    • Shopify
    • Yahoo! Store
  • Programming
    • API
      • Google
    • Javascript
    • Php
    • Server
    • SVN
  • VOIP

Recent Posts

  • How to write to Google Sheet with API in PHP
  • How to Migrate FreePBX server to a new server
  • Unifi Controller Java CPU 100%
  • Update Unifi Controller on Linux
  • Code Signing Desktop App