Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving entire site to subdir, preserving old links (?)
#3
zencoder Wrote:old link is www.mysite.com/index.html the new one after moving will be www.mysite.com/newroot/index.html. But I need that new link in new site for external world was remain in old form - www.mysite.com/index.html

Try using in your mysite.com folder following .htaccess content:
Code:
AddDefaultCharset UTF-8
RewriteEngine on

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)\.html$ newwroot/index.php?id=$1 [QSA,L]

also to make use of built-in GS menu (to be able to add pages to menu an then use get_navigation() in template) in custom permalinks settings set:
Code:
%slug%.html

Please keep in mind I am not an expert and can't test the above or guarantee it works.
Reply


Messages In This Thread
Moving entire site to subdir, preserving old links (?) - by Ampersand - 2011-11-16, 02:46:42



Users browsing this thread: 1 Guest(s)