Mod_Rewrite

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

rsmarsha
Forum Contributor
Posts: 242
Joined: Tue Feb 08, 2005 4:06 am
Location: Leeds, England

rewrite and variables in scripts

Post by rsmarsha »

Another question. :)

If i have a link like

a href="index.php?page=name&&var=1"

When using mod_rewrite would i have to change the link to

a href="index/page/var"

and how would the script then access the variables? If before it used :

$_GET['var']

would it now use

$_GET['2']

?

This would mean a lot of editing in the scripts. So was wondering if i needed to change not just the links, but the variables in the scripts too. Or if as the rewrite rule just changes the browser link, my scripts could still refer to the usual variables as the server still sees them.
Post Reply