Reputation: 8106
I have the following directive in a .htaccess file in a directory off the document root called "redirect":
# 2014-05-12 redirects all/any pages in this directory to https://new.domain.com/forms/test/
Redirect 301 / https://new.domain.com/forms/test/index.php
Yet when I logon to http://current.domain.com/redirect
(the home of the .htaccess file) the result is a page not found and the URL shows:
https://new.domain.com/forms/test/index.phpredirect
Why/how is this happening?
Upvotes: 1
Views: 35
Reputation: 785058
You should use mod_rewrite
instead of matching exact URI pattern as it support regex match.
RewriteEngine On
RewriteBase /redirect/
RewriteRule ^$ https://new.domain.com/forms/test/index.php [L,R=301]
Upvotes: 1