homepage Welcome to WebmasterWorld Guest from 54.167.244.71
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Posting variables to Mod ReWrite
... without actually going to another page?
panic




msg:1500729
 4:48 pm on Sep 23, 2003 (gmt 0)

Would it be possible to post variables to a URL without actually having the visitor go through that page?

For example :

The ReWrite Rule
RewriteEngine on
RewriteRule (.*)\.html search.php?var1=$1 [L]

Would it be possible to send the variables (along with HTTP_REFERER, REMOTE_ADDR, etc) to another URL (such as tracking.php) for tracking, without forcing the visitor to see it?

-panic

 

jdMorgan




msg:1500730
 1:32 pm on Sep 25, 2003 (gmt 0)

panic,

No and yes. You *do* have to "go there" to the script or html page, but you don't have to display the new URL to the user.

mod_rewrite can't "call" a script per-se; it is an in-line function in the server file lookup process for purposes of this discussion, so once it exits, it exits.

I'd suggest you call a script to do your counter function, and then have that script load a page or whatever you want to do afterward. You can use mod_rewrite to change the request for any page on your site into a request for the script, and then pass the originally-requested page to that script as a query string. After the script completes its function, it can then look at the query string and load the requested page for the user.

The above is still a bit general because I'm not sure I completely understood your question.

Jim

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved