tjburke79 Posted March 4, 2015 Share Posted March 4, 2015 (edited) Hello, I hope someone can help me out. I am trying to create a 301 redirect using a RewriteRule or a RedirectMatch example: /article/2002-03-17/247/test-subject-name-whatver.html I would like to redirect this and all other urls that are in the /article/ directory to my index page, is it possible redirect anything that is in the /articles/ directory? Thanks in advance Edited March 4, 2015 by tjburke79 Quote Link to comment https://forums.phpfreaks.com/topic/295095-mod-rewrite-help/ Share on other sites More sharing options...
requinix Posted March 4, 2015 Share Posted March 4, 2015 RedirectMatch (not Redirect) can do it, and is what I would use. RedirectMatch ^/article/ /index.phpRewriteRule can too, of course. Basically the same thing as above. RewriteEngine on RewriteRule ^/?article/ /index.php [L] Quote Link to comment https://forums.phpfreaks.com/topic/295095-mod-rewrite-help/#findComment-1507531 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.