I've got something that may help those of you encountering problems getting rewrite going. By default, rewrite translates into a path rewrite instead of a URL rewrite, so on many servers you'll run into this problem:
http://myserver -> /www/htdocs
and so, of course, a path looks like:
http://myserver/foo -> /www/htdocs/foo
which is fine. By default, mod_rewrite changes the requested path and file to the system path. Hence, when you encounter an Alias or ScriptAlias, such as the very common case:
http://myserver/cgi-bin -> /www/cgi-bin
the rewrite breaks. It actually ends up looking for /www/htdocs/cgi-bin/gforum/gforum.cgi instead of /www/cgi-bin/gforum/gforum.cgi, and hence breaks.
Anyway, the long-winded explanation over, the solution (if this is indeed where the problem lies) is to use the "PT" (passthrough) option. Basically, you change your rewrite lines adding the bit in red:
RewriteRule ^/fo......&t=search_engine [L,PT]
Do not, however, add "PT" to the last rule (the gforum.cgi one that ends with: [R, NE, L]).
Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
http://myserver -> /www/htdocs
and so, of course, a path looks like:
http://myserver/foo -> /www/htdocs/foo
which is fine. By default, mod_rewrite changes the requested path and file to the system path. Hence, when you encounter an Alias or ScriptAlias, such as the very common case:
http://myserver/cgi-bin -> /www/cgi-bin
the rewrite breaks. It actually ends up looking for /www/htdocs/cgi-bin/gforum/gforum.cgi instead of /www/cgi-bin/gforum/gforum.cgi, and hence breaks.
Anyway, the long-winded explanation over, the solution (if this is indeed where the problem lies) is to use the "PT" (passthrough) option. Basically, you change your rewrite lines adding the bit in red:
RewriteRule ^/fo......&t=search_engine [L,PT]
Do not, however, add "PT" to the last rule (the gforum.cgi one that ends with: [R, NE, L]).
Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com