Getting content from non-document root using ModRewrite rule

Using mod_rewrite to handle various content issues

Getting content from non-document root using ModRewrite rule

Postby sksonkar » Mon Aug 18, 2008 8:23 am

Hello,

We are using HP Apache 2.x RedHat Linux.
I have a requirement for writing modrewrite rule to serve the content from "/webserverdocumentroot/somedirectory/somefile.html"

Basically we need HTTP Status code 200 after hitting web page successfully. Usually modrewrite rule returns HTTP status in the range of 3xx or 4xx.

Appreciate if someone can write down the complete syntax using hp apache 2 modrewrite rule.

Thanks,
Shiv
sksonkar
 
Posts: 2
Joined: Mon Aug 18, 2008 7:01 am

Postby richardk » Mon Aug 18, 2008 4:47 pm

What mod_rewrite do you have? Does it work (except the wrong HTTP Status code)?

You could try adding R=200 to the flags.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby sksonkar » Tue Aug 19, 2008 11:23 am

richardk wrote:What mod_rewrite do you have? Does it work (except the wrong HTTP Status code)?

You could try adding R=200 to the flags.

====

I tried but it said invalid status code. Seems like it takes status code between 300 to 400 only. It doesn't take R=200.
sksonkar
 
Posts: 2
Joined: Mon Aug 18, 2008 7:01 am

Postby richardk » Wed Aug 20, 2008 11:15 am

Post your current mod_rewrite.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Content

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron