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

RE-WRITE Rule for Passing Sessions instead of Cookies

Quote Reply
RE-WRITE Rule for Passing Sessions instead of Cookies
Greetings,

I have a re-write file (.htaccess) that has the following rules stated below.
However, I am losing the user session "s=ksahkjhsfkjhsfoiu2o520u .." when the user logs in and navigate through the site...
Somehow... I think there is no rule in the .htaccess to cover the session scenario...
For example if user clicks on Login/Register, he/she will se be logged to the system and LINKS tells them you are logged in... however, if you click on any other link from the menu bar... the Login/Register still showing the URL shows http://www.mydomain.com/2/5/3/index.php (means no "s" value presented to indicated the user is logged in)...

Here is now my latest .htaccess file :

Code:

RewriteEngine On
###RewriteRule (.*)\.php $1.php [L]
RewriteRule (.*)\.css $1.css [L]
RewriteRule ^Images/(.*) Images/$1 [L]
RewriteRule ^images/(.*) images/$1 [L]
RewriteRule ^AddImages/(.*) AddImages/$1 [L]
RewriteRule ^banners/(.*) /banners/$1 [L]
RewriteRule ^static/(.*) static/$1 [L]
RewriteRule ^ads/(.*) ads/$1 [L]
# stuff so you can call custom templates via yoursite.com/g-template_name.html
RewriteRule ^g-(.*).html? /cgi-bin/links/page.cgi?p=$1 [L]
RewriteRule ^g-(.*)/? /cgi-bin/links/page.cgi?p=$1 [L]
# more page rewrite rule
RewriteRule ^([0-9/]+)/next([0-9]+)\.php$ /cgi-bin/links/page.cgi?g=$1/next$2.php [L]
RewriteRule /([0-9/]+)\.php$ /cgi-bin/links/page.cgi?g=$1/index.php [L]
RewriteRule /([0-9/]+)/next([0-9]+)\.php$ /cgi-bin/links/page.cgi?g=$1/next$2.php [L]

# detailed pages rewrite
RewriteRule ^Detailed/([0-9]+)\.php$ /cgi-bin/links/page.cgi?g=Detailed/$1.php [L]
# New, Pop, Ratings etc rewrite rules
RewriteRule ^New/?$ /cgi-bin/links/page.cgi?g=New [L]
RewriteRule ^Ratings/?$ /cgi-bin/links/page.cgi?g=Ratings [L]
RewriteRule ^Cool/?$ /cgi-bin/links/page.cgi?g=Cool [L]
# add, modify, search, subscribe, jump, user, and a generic rule to catch thre rest
RewriteRule ^([a-z]+).cgi$ /cgi-bin/links/$1.cgi [L]

RewriteRule ^corp/(.*).php /cgi-bin/links/page.cgi?page=$1 [L]
RewriteRule ^info/(.*) /cgi-bin/page.cgi?p=$1 [L]
RewriteRule ^(.*).php /cgi-bin/links/page.cgi?g=$1.php [L]
RewriteRule ^/?$ /cgi-bin/links/page.cgi [L]
RewriteRule ^$ /cgi-bin/links/page.cgi [L]

# perl links
RewriteRule ^(contact_us)(\.pl/)?$ /cgi-bin/links/contact_us.pl [L]

I think I am missing some rule to cover the user logs in/out...

Anyone can help figure this out...

thank you always for your help...
Mark
Subject Author Views Date
Post RE-WRITE Rule for Passing Sessions instead of Cookies Mark2 2021 Sep 28, 2008, 3:05 PM