wilderness

msg:4259504 | 3:53 pm on Jan 28, 2011 (gmt 0) |
| RewriteCond %{HTTP_USER_AGENT} android|blackber|htc|phone|mobile [NC] |
| Is this a typo? OR's require enclosure in parentheses. RewriteCond %{HTTP_USER_AGENT} (android|blackber|htc|phone|mobile) [NC]
|
mrtonyg

msg:4259616 | 6:14 pm on Jan 28, 2011 (gmt 0) |
Wilderness thanks for the reply. I just tried putting the parentheses and it made no difference. I have been running without the parentheses for months with no problems. There must be a missing conditional statement somewhere.
|
wilderness

msg:4259624 | 6:18 pm on Jan 28, 2011 (gmt 0) |
| RewriteRule ^(.*)$ [mobile.example.com...] [R,L] |
| Did you leave off the 302 intentionally? RewriteRule ^(.*)$ [mobile.example.com...] [R=302,L] BTW, if you've been running absent the parentheses? I'm inclined to believe your were just catching the first term and none of the rest. Jim or gm1 may expand.
|
mrtonyg

msg:4259630 | 6:47 pm on Jan 28, 2011 (gmt 0) |
I left off the "302" to keep the file size small...the "R" flag on its own implies a "302".
|
mrtonyg

msg:4259703 | 9:56 pm on Jan 28, 2011 (gmt 0) |
Well, I am happy to report that the problem has been fixed. The problem was that I was excluding the html file but not the corresponding css file. Thus when the browser requested the html file, the server redirected properly based on the rules but when the request came for the css file the name didn't match the exclusion and it had to fetch the matching css from the mobile site thus breaking up the formatting. I just renamed the css file the same name of the html and problem fixed. I could also have just added another exclusion but felt renaming the css file was simpler.
|
g1smd

msg:4259731 | 11:19 pm on Jan 28, 2011 (gmt 0) |
foo|bar|that is fine on its own. You need parentheses if there are other elements in the pattern: (foo|bar|that)something or if there is any anchoring at either end.
|
|