mod_rewrite help

I'm trying to make it so when a user points their browser to:
http://mainsite.com/mysite/foo/bar
it will rewrite it to:
http://mainsite.com/mysite/dispatcher.fcgi/foo/bar

The config i use now that does not work is:

RewriteEngine On
RewriteBase /mysite/
RewriteRule ^(.*)$ dispatcher.fcgi$1

Which just redirects to dispatcher, and seems to throw away $1. (the
REQUEST_URI is set properly in the environment, but PATH_INFO is not
set properly)
Nullard [ Mi, 10 Oktober 2007 20:34 ] [ ID #1841206 ]

Re: mod_rewrite help

"Nullard" <nullard [at] gmail.com> schreef in bericht
news:1192041287.338065.283620 [at] o80g2000hse.googlegroups.com.. .
> I'm trying to make it so when a user points their browser to:
> http://mainsite.com/mysite/foo/bar
> it will rewrite it to:
> http://mainsite.com/mysite/dispatcher.fcgi/foo/bar
>
> The config i use now that does not work is:
>
> RewriteEngine On
> RewriteBase /mysite/
> RewriteRule ^(.*)$ dispatcher.fcgi$1
>
> Which just redirects to dispatcher, and seems to throw away $1. (the
> REQUEST_URI is set properly in the environment, but PATH_INFO is not
> set properly)
>
I'ld rather use
RewriteRule ^(.*)$ dispatcher.fcgi/$1

the use of path_info might have been disalbed on your host:
http://httpd.apache.org/docs/2.2/mod/core.html#acceptpathinf o

try
RewriteRule ^(.*)$ dispatcher.fcgi?$1

and use the query string instead

HansH
HansH [ Mi, 10 Oktober 2007 21:09 ] [ ID #1841207 ]
Webserver » alt.apache.configuration » mod_rewrite help

Vorheriges Thema: append / include footer to every html page that is over 1 megabyte size.
Nächstes Thema: PHP error in module mode and not in cgi mode