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


jdMorgan - 8:32 pm on Oct 3, 2009 (gmt 0)


RewriteConds apply only to the single RewriteRule that follows. So, if the last two rules need to use the query string value, then they also need to have 'copies' of the RewriteCond ahead of them.

I'd also suggest adding a 'virtual start anchor' to that query string pattern:

RewriteCond %{QUERY_STRING} &?s=([^&]+)

This assures that the pattern only accepts exactly "s" as the variable name, and not just anything that ends with "s". That is, if any character precedes "s=", then it must be an ampersand.

Jim


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