mod_rewrite help

mod_rewrite help

am 10.10.2007 20:34:47 von Nullard

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)

Re: mod_rewrite help

am 10.10.2007 21:09:31 von HansH

"Nullard" schreef in bericht
news:1192041287.338065.283620@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