Reputation: 103
I have the following 2 identical lines in my .htaccess file
RewriteRule ^admin(.*)$ http://admin.abc.com/$1 [R=301,L,NC]
RewriteRule ^portal(.*)$ http://portal.abc.com/$1 [R=301,L,NC]
abc.com/portal - redirects nicely to portal.abc.com .
However - abc.com/admin - redirects to admin.abc.com/admin .
Note: The root directory has a WordPress installation. IN order to cancel the redirection of admin to wp-admin, I added the following line to the theme's function.php:
remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
Is that the issue?
(The quoted 2 RewriteRules are the first 2 lines in the .htaccess, right after "RewriteEngine On")
Thanks
Upvotes: 1
Views: 27
Reputation:
Those rules can't be doing that. I think you need to clear your browser cache and then you will find it works as you expect. You have some previous test result cached in your browser.
Upvotes: 1