[FASTCGI] FastCGI and mod_rewrite don't go well together...?!? Bug or Feature or UI (as in "user incompetence")?
Gabriel Petrovay
gabipetrovay at gmail.com
Sun Nov 9 06:22:54 EST 2008
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://localhostor
http://localhost/.
The FastCGI script handles the request
http://loclhost/default/indexcorectly. 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20081109/9fce2bf8/attachment.html>
More information about the FastCGI-developers
mailing list