Welcome to WebmasterWorld Guest from 107.20.34.173

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Posting variables to Mod ReWrite

... without actually going to another page?

     

panic

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

10+ Year Member



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

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

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

 

Featured Threads

Hot Threads This Week

Hot Threads This Month