Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Switching to an updated site


Martin1

Recommended Posts

You can add a "URL rewrite" to your .htaccess file:

 

RewriteEngine On

RewriteCond  %{REQUEST_URI} !^/newfolder  [NC]

RewriteRule  ^(.*)$  /newfolder/$1  [L]

 

You can change [L] to [R=301,L] if you want to tell users, search engines, etc. to update their listings to the new location.

 

Two caveats:

1. This won't work on Windows servers (IIS, Windows Server, etc.). I believe that there are ways to tell Microsoft servers to do something similar.

2. This assumes that you have the same directory structure, etc. on the new store as you do on the old. If not, your users may experience problems with saved bookmarks (or search engine listings) going to the wrong place, and you would have to do something more sophisticated to map the old structure to the new one.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...