Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a server, its httpd.conf already has some "RedirectMatch permanent" directives in it.

I'm not that familiar with mod_alias, I've only ever used mod_rewrite.

What's the basic difference? I don't see a "L" flag in mod_alias to stop processing rules.

Which one should I use for best practices of redirecting from one sub-domain to another?

Can I use both at the same time and will it be obvious which takes precedence?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
684 views
Welcome To Ask or Share your Answers For Others

1 Answer

mod_alias is basically a simpler version of mod_rewrite. It can't do some things that mod_rewrite can, such as manipulate the query string. If you're able to choose either of them, I don't see any reason that you'd want to use mod_alias.

Is there a specific reason you need to try to use both together?

Apache mod_rewrite & mod_alias tricks you should know seems to be a good article about the two. It notes at one point that mod_rewrite rules get executed before mod_alias ones.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...