Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Problems with mod_rewrite

Quote Reply
Problems with mod_rewrite
I'm on Mac OS X Server using Apache 1.3.26 with mod_rewrite loaded.
Now I wanted to enable the feature of Gforum for the search engine templates.
I use Gforum in a virtual host directory so I've inserted the following lines in the Virtual Host directive in httpd.conf:

Code:
<Directory "path/to/forum">
Options All +MultiViews +ExecCGI -Indexes
AllowOverride All
RewriteRule ^/forum/.*P([0-9]+)/?$ /gforum.cgi?post=$1&t=search_engine [L]
RewriteRule ^/forum/.*P([0-9]+)-([0-9]+)/?$ /gforum.cgi?post=$1&page=$2&t=search_engine [L]
RewriteRule ^/forum/.*C([0-9]+)/?$ /gforum.cgi?category=$1&t=search_engine [L]
RewriteRule ^/forum/.*F([0-9]+)/?$ /gforum.cgi?forum=$1&t=search_engine [L]
RewriteRule ^/forum/.*F([0-9]+)-([0-9]+)/?$ /gforum.cgi?forum=$1&page=$2&t=search_engine [L]
RewriteRule ^/forum/?$ /gforum.cgi?t=search_engine [L]
RewriteRule ^/forum/.*gforum.cgi /gforum.cgi?%{QUERY_STRING} [R,NE,L]
</Directory>

What's wrong?
The apache syntax check says that it's all right...
Thank you
Max
The one with Mac OS X Server 10.4 :)

Last edited by:

maxpico: Aug 30, 2002, 7:25 AM
Quote Reply
Re: [maxpico] Problems with mod_rewrite In reply to
Try adding

RewriteEngine On
RewriteOptions inherit

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Problems with mod_rewrite In reply to
Where?
In the Virtual Host directive or somewhere in httpd.conf?
Thanks
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Problems with mod_rewrite In reply to
just above the rest (i.e. in the virtual host directive)

You might also want to put RewriteEngine On in httpd.conf, don't know for sure, try it out.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Problems with mod_rewrite In reply to
Nope....... Frown
I have this in my .htaccess located in the root directory
Code:
RewriteEngine On
RewriteRule ^/forum/.*P([0-9]+)/?$ /forum/gforum.cgi?post=$1&t=search_engine [L]
RewriteRule ^/forum/.*P([0-9]+)-([0-9]+)/?$ /forum/gforum.cgi?post=$1&page=$2&t=search_engine [L]
RewriteRule ^/forum/.*C([0-9]+)/?$ /forum/gforum.cgi?category=$1&t=search_engine [L]
RewriteRule ^/forum/.*F([0-9]+)/?$ /forum/gforum.cgi?forum=$1&t=search_engine [L]
RewriteRule ^/forum/.*F([0-9]+)-([0-9]+)/?$ /forum/gforum.cgi?forum=$1&page=$2&t=search_engine [L]
RewriteRule ^/forum/?$ /forum/gforum.cgi?t=search_engine [L]
RewriteRule ^/forum/.+gforum.cgi /forum/gforum.cgi?%{QUERY_STRING} [R,NE,L]

The /forum is a virtual host root dir located under the main root dir
Max
The one with Mac OS X Server 10.4 :)