大家好我已经使用PHP将这个应用程序与不同的页面链接在一起。该应用程序工作正常,但生成的URL非常混乱和复杂。我在我的应用程序即在PHP中的URL重写
1.index.php (the default file)
2.video.php (the category page)
3.video-detail.php(the page for playing the video)
三页和根文件夹的名称是april
现在,它们是为应用程序生成的链接。
http://localhost/april/video?cat_id=2&category=Programming-Language
考虑到我在第二页浏览某个类别后,在第一页的用户输入了一些内容。现在我正在尝试让URL比这更干净。例如:URL应该采用这种格式。
http://localhost/april/Programming-Language.
我知道这个任务是使用.htacess实现的,但我无法真正理解它的方法。所以有关这个话题的任何帮助,我都非常感谢
你正在使用哪个框架? – lalithkumar
只是基本的PHP。以及Apache服务器。 –
你必须在.htaccess – lalithkumar