Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- PHP and mod rewrite


jdMorgan - 1:36 pm on Oct 2, 2009 (gmt 0)


Yes, use two rules, one for each "condition."

Do not use the "(.*)" pattern in your RewriteRules unless you really want to match "everything, anything, or nothing." Your use of that ambiguous pattern in both of your rules and leaving your patterns un-anchored ensures that whichever rule you put first, the other rule will never execute. I suggest using "([^/]+)$" in the RewriteRules and "([^&]+)" in the RewriteConds instead.

If you're not sure of the meanings of these suggested patterns, see the regular-expressions tutorial cited in our Apache Forum Charter (the Charter link is at the top left of this page).

Also, always use an [L] flag on your rules, unless you know specifically why you don't want to use it.

Jim


Thread source:: http://www.webmasterworld.com/apache/3999881.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com