By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,656 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

URL Redirecting issue

P: n/a
I explain the situation briefly.
I have a script taking a parameter:
switch.php?param=value

depending on this parameter I want to make a redirect to 1 of the 5
destination scripts, repassing the parameter:
scriptA.php?param=value
or scriptB.php?param=value
or scriptC.php?param=value
or scriptD.php?param=value
or scriptE.php?param=value
I would like to access the correct destination script in the following way:
www.myserver.com/value

I know how to make an URL rewrite for the switch:
RewriteRule ^(.*)$ /switch.php?param=$1 [QSA]

but then, within the switch script, I am doing the redirection using
header("Location: scriptC.php?param=value"), which modifies the URL
Do you know how can I achieve accessing the destination script by
keeping the initial URL "www.myserver.com/value" ?

Cheers

Daniele
Aug 18 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Aug 18, 2:20*pm, Ubimmc93 <ubimm...@libero.itwrote:
but then, within the switch script, I am doing the redirection using
header("Location: scriptC.php?param=value"), which modifies the URL

Do you know how can I achieve accessing the destination script by
keeping the initial URL "www.myserver.com/value" ?
Can you simply include('scriptC.php')?
Aug 18 '08 #2

P: n/a
Can you simply include('scriptC.php')?

You are actually right! Simply as that!
Thanks

Daniele
Aug 18 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.