.htaccess - Sitewide redirects -


i'm working on doing site-wide redirect, while still maintaining consistent url pattern.

http://www.site1.com/folder/page

should first redirect to http://www.site1.com/redirecthandler?dest=folder/page

which have link http://www.site2.com/folder/page

i can code last part, since there several hundred pages, i'm hoping can show how first redirect via htaccess, instead of individual code on each page?

did investigation, here's found trick (much simpler thought)

rewriteengine on rewriterule ^(.*)$ http://www.site1.com/redirecthandler?dest=$1 [r=301,l] 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -