[英]How can I redirect to a special page when I have parameters in url slashes?
For example, I want the users to be able to go to a tour using a link like this:例如,我希望用户能够使用这样的链接 go 进行游览:
page.com/tour/name
How can I make it, like redirecting to tour.html and then loading there the info using the name parameter in the URL?我怎样才能做到这一点,比如重定向到 tour.html,然后使用 URL 中的 name 参数加载信息? Using JS.
使用 JS。
You can use this lines in the .htaccess file您可以在 .htaccess 文件中使用此行
RewriteEngine on
RewriteRule ^tour/([^/]+).php /page.php?search=$1 [NC]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.