Welcome to WebmasterWorld Guest from 220.127.116.11
- working fine
Redirect 301 "/pages/example_page.html" http://example.com/pages/example-page/ - not working
RewriteRule ^(pages/)?old-example-page-url/$ http://example.com/example-page/ [R=301,L]
[edited by: not2easy at 3:54 am (utc) on Mar 5, 2017]
[edit reason] readability edit [/edit]
when there are Redirect(Match) and RewriteRule directives in the same scope, the RewriteRule directives will run first, regardless of the order of appearance in the configuration file
Note that if you are already using RewriteRule (mod_rewrite) then you probably shouldn't be trying to use RedirectMatch (mod_alias). The mod_rewrite directives are likely to take priority, regardless of their order.
Any rule that creates a redirect goes before the rules that create rewrites alone. If it isn't your own server, the only way you can be sure this happens is by doing everything in the same module.