Operating System - HP-UX
1833767 Members
2261 Online
110063 Solutions
New Discussion

HP Apache 2.x on HP-UX ModRewrite Rule

 
Shivkumar
Super Advisor

HP Apache 2.x on HP-UX ModRewrite Rule

Hello,

We are using HP Apache 2.x on HP-UX Unix.
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. The usual modrewrite rule returns HTTP status 3xx.

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

Thanks,
Shiv
3 REPLIES 3
Steven Schweda
Honored Contributor

Re: HP Apache 2.x on HP-UX ModRewrite Rule

> I have a requirement for writing modrewrite
> rule to serve the content from
> "/webserverdocumentroot/somedirectory/somefile.html"

I'm stuck at Apache 1.3, but I thought that
a rewrite rule was used to transform one
URL file spec into another. What are you
trying to transform into what?

> [...] The usual modrewrite rule returns
> HTTP status 3xx. [...]

It does? What _is_ the "usual modrewrite
rule"? What is "xx" in "3xx"? (Do you
think that hiding details like this is
helpful?) I normally see "200" in my access
log for rewritten accesses.
Shivkumar
Super Advisor

Re: HP Apache 2.x on HP-UX ModRewrite Rule

3xx means it could be 301 or 302.
Redirected pages return http status codes in the series of 3xx.
Steven Schweda
Honored Contributor

Re: HP Apache 2.x on HP-UX ModRewrite Rule

> 3xx means it could be 301 or 302.

It may to you. To me it includes 304, and
some others.

> Redirected pages return http status codes
> in the series of 3xx.

Yes, but there's a difference between
"redirect" and "rewrite". A rewritten URL
can easily return a 200 status code. A
redirected URL should return a 302 (or
similar).

Only you can see what's in your httpd.conf
file, so it's hard for me to guess what
you're really doing. (And you haven't
answered many questions.)