Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

mod_rewrite & page.cgi?g=

Quote Reply
mod_rewrite & page.cgi?g=
Hi,

can anyone give me an exact instruction how can I do the following:

I want to make only the "..page.cgi?g=.." links (cats & subcats) look static with mod rewrite.
  • How has the rewrite command has to look like exactly?
  • how has(have) the needed global(s) exactly look like?
  • which changes have to be made in which templates?


Cheers,
Manuel

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.

Last edited by:

ManuGermany: Jul 18, 2004, 8:31 AM
Quote Reply
Re: [ManuGermany] mod_rewrite & page.cgi?g= In reply to
Something like this should work;

Code:
RewriteEngine On
RewriteRule (.*)\.css $1.css [L]
RewriteRule ^images/(.*) images/$1 [L]
RewriteRule ^AddImages/(.*) AddImages/$1 [L]
RewriteRule ^Images/(.*) Images/$1 [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]

This will work based on your ROOT URL...i.e;

http://www.yoursite.com/Cool would transfer to http://www.yoursite.com/cgi-bin/page.cgi?g=Cool

You shouldn't need to add any new globals, or make any template changes. Just be sure NOT to pass &d=1 along in the URL; and then as far as LSQL is concerned, we are still running in static mode :)

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] mod_rewrite & page.cgi?g= In reply to
Thanks Andy,

but unfortunately, this is not exactly what I want to do.

Quote:

I want to make only the "..page.cgi?g=.." links (cats & subcats) look static with mod rewrite

I want to do this in a way, that not the whole root directory/LSQL-installation is "infected" but just the "selected" LSQL-template which should run in static-mode as it is and in dynamic-mode with rewritten URL's.

(Something like:

<%id d eq '1'%>

<A HREF="<%rew_cats($URL)%>">CatName</A>

<%else%>

<A HREF="<%URL%>">CatName</A>

<%endif%>


)

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.

Last edited by:

ManuGermany: Jul 19, 2004, 2:24 AM
Quote Reply
Re: [ManuGermany] mod_rewrite & page.cgi?g= In reply to
Which sections specifically did you want to set mod_rewrite on?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] mod_rewrite & page.cgi?g= In reply to
I'm using yahoo-subcats and I want to rewrite the cats & subcats at home.html and the subcats at the cat's directory-pages:

home.html : http://www.shop-netz.de/...in/shop/page.cgi?d=1

cat's directory-pages: http://www.shop-netz.de/...2Findex.html&d=1

(and eventually the dynamic spanning-pages links : .../moreX.html)

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.