Martin1 Posted September 20, 2014 Share Posted September 20, 2014 My current site is located in the root folder but I have an updated site in a subfolder. What would be a good and effective way to switch to the new site? Link to comment Share on other sites More sharing options...
MrPhil Posted September 20, 2014 Share Posted September 20, 2014 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 More sharing options...
Martin1 Posted September 20, 2014 Author Share Posted September 20, 2014 Thank you, I will give it a try. My server is an Apache server btw. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.