0

Lest say i have a link and when some one click on that link it redirect the person to the following page

http://localhost/install.php?act=go

now i just want to remove everything after ? so that person doesn't see the actual query string behind it or is there any way to encode the characters and make it look different in browser

3
  • 1
    Why do you want to do that? You can only send GET parameters by appending to the URL. Commented Jul 30, 2011 at 18:01
  • i dnt want people to look at my parameters Commented Jul 30, 2011 at 18:03
  • 1
    If you don't want people to look at your parameters, try using session or cookie data to keep the state of the user. Commented Jul 30, 2011 at 18:50

1 Answer 1

2

You can add a mod_rewrite rule to your htaccess something like
RewriteRule ^install/([A-Za-z0-9-_]+)$ /install.php?act=$1
that way /install/go takes you to the destinantion

Sign up to request clarification or add additional context in comments.

5 Comments

@Jonathan: Is this just an aesthetic issue, or should this info really not be visible to the user? Also, if you need more than one parameter, you'll need a different rewrite rule.
thing is that on one page i am performing more than one task after checking the $_GET values so if everyone is able to see those values than they will not follow the right steps and try to jump forward
If it's something like a multi-page form, can you just send the values via POST instead? Or would it be more appropriate to store them in the session where the user can't see/modify the value once it's been set?
using the rewrite above it accomadates for any value of act so if your next step was /install.php?act=something then you can point /install/something but yes if you want more that parameter then u will need a different rewrite or you can do as chris suggested and use a post or session
yeah post won't work in my case but using sessions will be good , i think guys u solved my problem ....Thanks to you ! :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.