简体   繁体   中英

Removing query string from url in php

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM