You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Karl Orbell <ka...@gmail.com> on 2006/09/24 16:20:50 UTC

[users@httpd] SCRIPT_URL not being set.

Hello, a server I'm working with is running:

Apache/2.0.55
PHP/5.1.2

With a lot of RewriteRules working fine.

However, sometimes I need to know what the request was before processing, so
I always use SCRIPT_URL - but for some reason it doesn't appear to be set.
I know the Rewrites are working, but none of the environment variables set
by mod_rewrite, accessed via $_SERVER or directly by getenv are there.

Anyone else ever had this problem, or know what the cause might be?

Regards,



Karl.

Re: [users@httpd] SCRIPT_URL not being set.

Posted by Karl Orbell <ka...@gmail.com>.
No, definitely SCRIPT_URL, though none of the 4 environment variables
are being set, hence the problem.
mod_rewrite usually sets 4 env variables:
SCRIPT_NAME
SCRIPT_FILENAME
SCRIPT_URL
SCRIPT_URI
See (http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#EnvVar)
I just can't work out why they're not being set on this setup.

Karl.
---
On 24/09/06, Steve Swift <st...@gmail.com> wrote:
> I've never come across SCRIPT_URL - were you thinking of SCRIPT_NAME ?
>
>
>
> On 24/09/06, Karl Orbell <karlorbell@gmail.com > wrote:
> >
> > Hello, a server I'm working with is running:
> >
> > Apache/2.0.55
> > PHP/5.1.2
> >
> > With a lot of RewriteRules working fine.
> >
> > However, sometimes I need to know what the request was before processing, so I always use SCRIPT_URL - but for some reason it doesn't appear to be set.  I know the Rewrites are working, but none of the environment variables set by mod_rewrite, accessed via $_SERVER or directly by getenv are there.
> >
> > Anyone else ever had this problem, or know what the cause might be?
> >
> > Regards,
> >
> >
> >
> > Karl.
>
>
>
> --
> Steve Swift
> http://www.swiftys.org.uk

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SCRIPT_URL not being set.

Posted by Steve Swift <st...@gmail.com>.
I've never come across SCRIPT_URL - were you thinking of SCRIPT_NAME ?

On 24/09/06, Karl Orbell <ka...@gmail.com> wrote:
>
> Hello, a server I'm working with is running:
>
> Apache/2.0.55
> PHP/5.1.2
>
> With a lot of RewriteRules working fine.
>
> However, sometimes I need to know what the request was before processing,
> so I always use SCRIPT_URL - but for some reason it doesn't appear to be
> set.  I know the Rewrites are working, but none of the environment variables
> set by mod_rewrite, accessed via $_SERVER or directly by getenv are there.
>
> Anyone else ever had this problem, or know what the cause might be?
>
> Regards,
>
>
>
> Karl.
>



-- 
Steve Swift
http://www.swiftys.org.uk