[英]htaccess - Redirect to the same location irrespective of presence of trailing slash
I want to redirect the following sets of links: 我想重定向以下几组链接:
using htaccess and mod rewrite in a standardized general format associating the appropriate PHP get tags and values to the corresponding SEO-friendly link. 使用htaccess和mod重写以标准化的通用格式,将适当的PHP get标签和值关联到相应的SEO友好链接。 How do I do so?
我该怎么做?
I've tried tinkering around with RewriteCond and REQUEST_FILENAME but just cannot seem to get it to work. 我尝试过修改RewriteCond和REQUEST_FILENAME,但似乎无法使其正常工作。
Something like this might help: 这样的事情可能会有所帮助:
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/? /$1.php?$2=$3 [NC,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/? /$1.php?$2=$3&$4=$5
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.