我想知道是否有可能在具有相同参数但具有不同参数名称的两个URL之间进行差异化 .
这就是我所拥有的 . 但是htaccess总是返回第一个选项:-(
有人能以正确的方式指出我吗?
这些都是网址
https://xxxxxx/videos.php?categoria=Mimo&orden=fecha
https://xxxxxx/videos.php?orden=views&limit=5
这就是我想要的方式
https://stars.pullmantur.es/pull/Mimo/Fecha
https://stars.pullmantur.es/pull/views/5
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{QUERY_STRING} ^categoria=([A-Za-z\+]+)&orden=([A-Za-z0-9\+]+)$
RewriteRule videos\.php$ participantes-casting-online/%1/%2? [R=301,L]
RewriteRule ^participantes-casting-online/([^/]*)/([^&]+)$ videos.php?categoria=$1&orden=$2 [L,NC,QSA]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{QUERY_STRING} ^orden=([A-Za-z\+]+)&limit=([,0-9\+]+)$
RewriteRule videos\.php$ participantes-casting-online/%1/%2? [R=301,L]
RewriteRule ^participantes-casting-online/([^/]*)/([^&]+)$ videos.php?orden=$1&limit=$2 [L,NC,QSA]
谢谢
1 回答
将此代码放在
DOCUMENT_ROOT/.htaccess
文件中: