Gossamer Forum
Home : Products : Gossamer Links : Discussions :

mod_rewrite

Quote Reply
mod_rewrite
I've added this to my .htaccess

# Rewrite for SE/User friendlyness
RewriteEngine On
RewriteRule ^travelguides/(.+) /cgi-bin/directory/page.cgi?g=$1&d=1 [L]

it works like a charm, does in fact redirect the user to where I want them to go. here's my question: once a user gets into the links by going to http://www.mysite.com/travelguides/whatever the navigation in the templates still shows dynamic addresses. is there a rewrite rule that I could use so that if they hit "home" they didn't get http://www.mysite.com/.../page.cgi?g=&d=1 in their browser? I'd rather them not bookmark that, I'd rather them bookmark http://www.mystie.com/travelguides/index.htm or something like that... not to mention spider food.

any help is greatly appreciated.

Will
Quote Reply
Re: [wwwill] mod_rewrite In reply to
just to be clear, I'm also referring to add, modify, etc. etc. etc. is there a rewrite way to do this AFTER the user has gotten into the links? (it's very late and I'm prolly not thinnking clear right now )

thanks!
Quote Reply
Re: [wwwill] mod_rewrite In reply to
Try leaving the d=1 off the end of the address.
Quote Reply
Re: [afinlr] mod_rewrite In reply to
thanks for the suggestion.

I left off the d=1 at the end, and when I did, my HOME, TOP, and NEW nav for some reason led to the static build pages... not what I want. I guess I'll put the d=1 back in, but I still have my original problem.

I guess I should hardcode those URLS in the template?
Quote Reply
Re: [wwwill] mod_rewrite In reply to
Then you'll need to add rewrite rules for each of the pages which is not covered by the rule above - I guess your homepage rule would need to be something like:

RewriteRule ^$ /cgi-bin/directory/page.cgi [L]

If you have rules which cover each of the static urls in your directory then you can have the whole directory appearing to be static.
Quote Reply
Re: [afinlr] mod_rewrite In reply to
thanks a lot! I'm new to lsql and I'm sure I'll have bunch of other questions. thanks for the help. it's appreciated!