.htaccess - htaccess redirect with domain masking for Wordpress site not working -


the below .htaccess configuration not working on wordpress site achieve domain redirection masking:

directoryindex index.php  options +followsymlinks -multiviews rewriteengine on rewritebase /  rewritecond %{http_host} ^(www\.)?redir2$ [nc] rewriterule ^ http://redir1%{request_uri} [l,ne,p] 

this .htaccess of redir2 redirecting redir1 masking. goal have user type in example redir2/sub, served content of redir1/sub, shown url of redir2/sub.

it working fine on local installation. on shared hosting redirects without masking. assume problem might somewhere in server configuration.

any ideas problem?

just records here similar question asked when had problem index file when redirecting masking: htaccess redirect domain masking not working when requesting root directory

wordpress canonical url functionality designed this.

although plugin not actively supported anymore, might work.

<?php /*  plugin name: disable canonical url redirects  plugin uri: http://www.imaginethought.com/  description: disables "canonical url redirect" feature of wordpress (in versions of wordpress 2.3 , greater). use plugin, activate it. then, disable if need re-enable "canonical url redirect" feature of wordpress.    version: 1.0.11.0228  author: geoffrey griffith  author uri: http://www.imaginethought.com/  license: gpl */   remove_filter('template_redirect', 'redirect_canonical');  ?> 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -