I must redirect a URL using RedirectMatch within Apache eg,
/test/one/?? redirect to /test/two/??
in which the ?? signifies any string that follows
The redirect i am using below does a straight redirect but does not match any string after... RedirectMatch Permanent ^/test/one?$ /test/two/
RewriteEngine ON RewriteBase / RewriteRule ^/test/one/(.+)$ /test/two/$1
if that doesn't work, change ^/test/one into ^test/one
make certain mod_rewrite is enabled
You should use mod_rewrite with this:
RewriteEngine On RewriteBase / RewriteRule ^/test/one/(.*) /test/two/$1 [L,R=301]
R flag redirects the page instead of internally spinning the URI.
301 may be the HTTP status code for "Permanently Moved" - if you would rather use another, you are able to change it out to one of these.