Re: FastCGI and mod_rewrite don't go well together...?!? Bugor Feature or UI (as in "user incompetence")?

"Rob Saccoccio" <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel,gmane.spam.detected
Message-ID <DD55A96F39124800ACE387CD1519762F@maisel>
This should work fine, but I wouldn't expect the rewritten uri to be in
REQUEST_URI.  

 

I think what you're looking for is in REQUEST_FILENAME.  Have a closer look
at the mod_rewrite docs.

 

mod_fastcgi should, in general, do the same thing that mod_cgi does.  IOW,
if you ever question whether mod_fastcgi is doing the right thing, try it
with mod_cgi.

 

Rob

 

 

  _____  

From: fastcgi-developers-bounces+robs=fastcgi.com-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
[mailto:fastcgi-developers-bounces+robs=fastcgi.com-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org] On
Behalf Of Gabriel Petrovay
Sent: Sunday, November 09, 2008 6:23 AM
To: fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
Subject: [FASTCGI] FastCGI and mod_rewrite don't go well together...?!?
Bugor Feature or UI (as in "user incompetence")?

 

Hi all,

I use FastCGI together with mod_rewrite for a site. Here is my .htaccess
file content for the DocumentRoot directory:

AddHandler fastcgi-script .exe
Options +FollowSymLinks +ExecCGI

RewriteEngine On

# rewrite empty URIs to /default/index
RewriteRule ^$|^/$ /default/index [QSA]

# if the requested path does not match a file, rewrite the URI and execute
the fcgi script
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /fcgi-bin/sausa_fcgi.exe [QSA,L]

---------------------

What I am trying to achieve is: I want to have the default page
http://localhost/default/index when the user asks only for http://localhost
or http://localhost/.

The FastCGI script handles the request http://loclhost/default/index
corectly. Meaning that I get my expected result. (FastCGI picks the
/default/index resource from another location).

When I log the internal requests for http://localhost/ I get the following
list:
/
/default/index
/fcgi-bin/sausa_fcgi.exe

but inside the FCGI handler, the REQUEST_URI in request->envp tells me only
"/". Does that mean that FastCGI cannot handle internal requests generated
by RewriteRule (mod_rewrite) and can only give me only the initial request
uri?

I use the following FCGI library function calls:

FCGX_Accept_r(&request)
FCGX_GetParam("REQUEST_URI", request.envp)

I was expecting that FCGX_GetParam returns "/default/index" and not "/"

Thanks!
Regards,
-- 
MSc Gabriel Petrovay
MCSA, MCDBA, MCAD
Mobile: +41(0)787978034

_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.