473,407 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Rewriting an Absolute URL with Session IDs

Basically, I've got a project with a huge number of existing pages,
some absolute URL's, some relative. It's getting a new shopping cart
using sessions, and needs to work without cookies (client's
requirement, non-negotiable) if the user has them disabled. To that
end, I've enabled session.use_trans_sid which handles relative URL's.

The question is, does anyone have a good solution for rewriting
absolute URL's? I know, I know, offsite links could leak sessions and
be a security risk. This particular client has almost zero offsite
links (to Thawte and the like mostly), and there are other
anti-session hijacking measures implemented, so they've decided it's
an acceptable risk.

It's PHP 4.3.x, Apache 2.x, on a dedicated server, so just about any
implementation is possible (no shared hosting provider to beg access
from)

Thanks
Jul 17 '05 #1
1 1886
go****@robot138.com (name?) wrote in message news:<b2**************************@posting.google. com>...
<snip>
The question is, does anyone have a good solution for rewriting
absolute URL's? I know, I know, offsite links could leak sessions and
be a security risk. This particular client has almost zero offsite
links (to Thawte and the like mostly), and there are other
anti-session hijacking measures implemented, so they've decided it's
an acceptable risk.


<?php
function my_rewrite($buffer)
{
if ($buffer contains absolute urls of same site)
{
fix $buffer by appending SID
}
return $buffer;
}

ob_start('my_rewrite');
//rest...
?>
--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Gordan | last post by:
Hi, here's my problem. On my pages I have URL souch as these "page.php?id=2&subpage=3&param=65". For security reasons I would like to add another parameter. It would be created like this...
3
by: Pooja Renukdas | last post by:
Hello, I have this web site where only two pages have to be secure pages and I need to call them using https, but since I have my development server and my production web server, I dont want to...
3
by: Michael Appelmans | last post by:
I'm trying to use a rule based URL rewrite application which uses HttpApplication.RewritePath. I keep getting "rsource not found" error in application when running on shared web host although the...
1
by: Andre Ranieri | last post by:
I have a quick question - I'd just like to have confirmation to be sure. I'm building an ASP.NET corporate site for my employer, some of the pages have e-commerce capability and will need to be...
0
by: Lee | last post by:
Hi all ;) Preamble -------- I'm using URL rewriting to enforce a frames policy (yeah, I know frames are 'bad' :) - i.e. if a request comes in for a page which should be nested within a...
0
by: Jens Weiermann | last post by:
Hi, I've recently modified my asp.net web application to place some files in subfolders. To accomplish that, I've changed link urls to an absolute path, i. e. "/myapp/somefile.aspx" instead of...
3
by: JeffDotNet | last post by:
I wrote a small data processing application that writes a summary of several hundred files. I use drag and drop on a panel (Panel1) to grab the absolute path to each of these files. Then I begin...
1
by: Ryan | last post by:
Im building a mutli-lingual website in .net 2.0 and Im having an issue with url rewriting and Im having an issue with the xml sitemap provider and menus. If i have a url:...
3
by: Toni | last post by:
Does anyone have a recommended method of rewriting URLs with classic ASP? For example, if the browser shows the Friendly URL www.mydomain.com/blue_widget my app will show the following Content...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.