简体   繁体   中英

Implementing slash in links like: example.com/parameter

I am trying to create links like example.com/parameter which leads to example.com?id=parameter or example.com/index.php?id=parameter using php
I searched alot about this and could not find a reference. all I need is the name of this technique so I can search for it.

Check out mod_rewrite example. It's called URL rewriting or clean URLs.

您使用像URL重写一样的mod_rewrite,但设计模式称为front controller

你需要创建一个.htaccess文件来重写你的URL,有很多教程,请看看这篇文章

This technique is called URL rewriting . The most common way of doing this is using Apache's mod_rewrite module (you can Google that).

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