我想要关注网址:
example.com/locations
指向:
example.com/locations/?dest=los+angeles&lat=34.0522342&long=-118.2436849
但我不希望用户看到该长网址。即用户只应看到example.com/locations
答案 0 :(得分:0)
在.htaccess文件中使用此功能
DirectorySlash Off
RewriteEngine On
RewriteRule ^locations$ locations/?dest=los+angeles&lat=34.0522342&long=-118.2436849