odd behavior with passthrough/redirect

Oh, the strange things mod_rewrite does!

odd behavior with passthrough/redirect

Postby katmutti » Thu Nov 29, 2007 5:50 am

I'm having some issues with our rewrite rules. The rules below work just fine with exception on one javascript. For some reason, it displays either a blank page or an application error. I was able to change the flag to "R" and that worked if you are directly on the serverer (no vitural url), but if you access the site via url, it gives a blank page. Is there anyway to incorporate the pass through with the redirect?Thoughts?

RewriteEngine on
RewriteLog /ckfr/logs/apache/program/rewrite_log
RewriteLogLevel 9
RewriteCond %{QUERY_STRING} ^(.*&)sp=1299(&.*)?$ [OR]
RewriteCond %{QUERY_STRING} ^(.*&)sp=CFWB2(&.*)?$ [OR]
RewriteRule ^/program/app(.*)$ /pilot_program/app$1 [PT,C]
katmutti
 
Posts: 7
Joined: Tue Oct 16, 2007 6:48 am

Postby katmutti » Thu Nov 29, 2007 7:47 am

A bit more information.

In our lower environments, the above configuration works perfectly. In our production environment, we experience the blank page The url that it is redirected to is https://domain/program/wps (minus the query string). The environments should be the same and going through the apache configurations, I could find no differences. At this point, I am working on seeing if I can get the prod environment to work with different flags. Any help would be welcome.
katmutti
 
Posts: 7
Joined: Tue Oct 16, 2007 6:48 am

Postby richardk » Thu Nov 29, 2007 3:15 pm

Where are you putting it? What's special about the one JavaScript file? Is there one a similarly named file, does it exist?

Try
Code: Select all
Options +FollowSymLinks -MultiViews

RewriteEngine On

RewriteLog /ckfr/logs/apache/program/rewrite_log
RewriteLogLevel 9

RewriteCond %{QUERY_STRING} ^(.*&)sp=(1299|CFWB2)(&.*)?$ [NC]
RewriteRule ^/program/app(.*)$ /pilot_program/app$1 [NC,PT,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby katmutti » Thu Nov 29, 2007 3:48 pm

I tried what you listed above earlier w/o success. I finally found my solution. If I used redirect, because it is a handler, it can't handle the redirect because it isn't a full url. Once I used a full url (wasn't sure I wanted to do this cause we use a foundry and I didn't know how it would handle the traffic with our sticky's and persistant connections). In the end, because of how we have our apaches set up, it does consistantly go to the same apache and passes the new handle api. Thanks for your time!
katmutti
 
Posts: 7
Joined: Tue Oct 16, 2007 6:48 am


Return to Idiosyncrasies

Who is online

Users browsing this forum: No registered users and 2 guests

cron