简体   繁体   中英

How to hide “index.php?go=” from my URL?

I'm interested to know, find a solution, how can I hide "index.php?go=" from my URL.

Actually my url is displayed like this: http://mywebsite.com/index.php?go=home I have been looking for a good solution but I didn't find a good one :( I tryed with htacces and best that I found was to hide only "index.php" not all that I needed. Now with htaccess enabled my link is displayed like this: http://mywebsite.com/?go=home ....

Can anyone find I good solution how to hide that "?go=" from the URL?

I will really appreciate your answer.

You can use URL Rewriting. It's server-side. You define rules and patterns. In .htaccess file.

It looks like this: RewriteRule /([az]+)/ /index.php?go=$1 This would rewrite /home/ into /index.php?go=home

You can do very powerful things with it.

But you'll need to define the "format" of your URL.

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