Gossamer Forum
Home : Products : Gossamer Links : Discussions :

rewrite help: why /category/index.html work , and not /category?

Quote Reply
rewrite help: why /category/index.html work , and not /category?
Hi all,

I used the mod rewrite to make my linksql search engine friendly.

www.domain.com/category/index.html will show up correctly while
www.domain.com/category/ will give 404 not found error.

May i know what am i missing in my .htaccess?
Quote Reply
Re: [gundamz] rewrite help: why /category/index.html work , and not /category? In reply to
If you post what you're currently using it will be easier for someone to suggest a correction.
Quote Reply
Re: [afinlr] rewrite help: why /category/index.html work , and not /category? In reply to
Here's what i used

RewriteEngine On RewriteRule (.*)\.css $1.css [L]
RewriteRule ^p/(.*) /cgi-bin/page.cgi?g=$1 [L]
RewriteRule ^info/(.*) /cgi-bin/page.cgi?p=$1 [L]
RewriteRule ^(.*).html /cgi-bin/page.cgi?g=$1.html [L]
RewriteRule ^$ /cgi-bin/page.cgi [L]
Quote Reply
Re: [gundamz] rewrite help: why /category/index.html work , and not /category? In reply to
You could add

RewriteRule ^(.*)/$ /cgi-bin/page.cgi?g=$1 [L]

Note that this means that ANY urls on the site that end in / must be categories in links.

Last edited by:

afinlr: Feb 13, 2005, 8:34 AM
Quote Reply
Re: [afinlr] rewrite help: why /category/index.html work , and not /category? In reply to
thanks.