Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

$_SERVER['php self'] and MOD Rewrite

Login woes

7:51 pm on Jul 8, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Feb 4, 2005
votes: 0

When a user hits a restricted page, I store a session_var holding the desired url, then I direct them over to the login page. If the login is successful I send them back to where they came from.

The problem is that with mod_rewrites in place, $_SERVER['php self'] and referer, and URI all pull up the ACTUAL url (so in my case it pulls up the .PHP files instead of my re-written .HTML files). So the redirect will be incorrect.

So how does one solve this problem with the least amount of work?

9:39 pm on July 8, 2006 (gmt 0)


WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
votes: 2

Stuff the
value into your saved URI session variable.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members