Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [Jesus] rewrite rules question

Quote Reply
Re: [Jesus] rewrite rules question In reply to
Hi,

You need to view your site statically - not dynamically. The rewrite rules rules should take your static links and change them to dynamic ones.

To test whether they are working, try changing the [L] to [R] (just for testing). You should then be able to type a static link into your browser address bar and see it change to the correct dynamic address.

I'm not sure that I agree that this is the best set of rewrite rules for a general site. In particular, this rule
RewriteRule ^(.*).html /cgi-bin/choulinks/page.cgi?g=$1.html [L]
will not allow you to have any static html pages in your site. I can't see what the first four rules achieve - maybe Andy could explain why he is using them Wink.

I would think something like this would be enough - where /links/ is the directory that you are using for your links installation.

RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^\.htaccess$ - [F]

RewriteRule ^$ /cgi-bin/choulinks/page.cgi [L]
RewriteRule ^/p/(.*)$ /cgi-bin/choulinks/page.cgi?p=$1 [L]
RewriteRule ^/links/(.*)$ /cgi-bin/choulinks/page.cgi?g=$1 [L]
Subject Author Views Date
Thread rewrite rules question Jesus 2656 Apr 25, 2004, 9:54 PM
Thread Re: [Jesus] rewrite rules question
afinlr 2579 Apr 26, 2004, 3:22 AM
Thread Re: [afinlr] rewrite rules question
Andy 2586 Apr 26, 2004, 3:52 AM
Thread Re: [Andy] rewrite rules question
ccunet 2560 Apr 26, 2004, 6:14 AM
Post Re: [ccunet] rewrite rules question
Andy 2579 Apr 26, 2004, 6:17 AM
Thread Re: [afinlr] rewrite rules question
ccunet 2565 Apr 26, 2004, 6:48 AM
Post Re: [ccunet] rewrite rules question
afinlr 2558 Apr 26, 2004, 6:56 AM
Thread Re: [ccunet] rewrite rules question
afinlr 2590 Apr 26, 2004, 7:03 AM
Post Re: [afinlr] rewrite rules question
Andy 2574 Apr 26, 2004, 7:05 AM
Post Re: [Jesus] rewrite rules question
Jesus 2537 Apr 26, 2004, 5:17 PM