本文介绍了获得价值htaccess以及分页的限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此网址
example/videos/load.php?cat=video-category
将成为
example/videos/video-category
此外,还有分页和限制网址
Also, there is pagination and limit url
example/videos/load.php?cat=video-category&p=2&limit=20和它会成为
example/videos/video-category?page=2&limit=20此网址也适用
example/videos/video-category?page=2 example/videos/video-category?limit=20下面是我的htaccess(成视频文件夹)
Here is my htaccess (into videos folder)
Options +FollowSymLinks RewriteEngine on RewriteBase /videos/ RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ www.%{HTTP_HOST}/$1 [R=301,NE,L] RewriteRule ^([^/]+)/?$ load.php?cat=$1 [L,QSA] RewriteRule ^([^/]+)/page/?$ $1 [R=301,L] RewriteRule ^([^/]+)/page/([1-9][0-9]*)$ load.php?cat=$1&p=$2 [L,QSA]
怎么做.. plz帮助我..谢谢..
how to do this.. plz help me.. thanks..
推荐答案想,也许您正在寻找这样的事情?
Think maybe you're looking for something like this?
Options +FollowSymLinks RewriteEngine on RewriteBase /videos/ RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ www.%{HTTP_HOST}/$1 [R=301,NE,L] RewriteCond %{THE_REQUEST} \ /+videos/load\.php\?cat=([^&\ ]+)&?([^\ ]*) RewriteRule ^ %1?%2 [L,R] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/?$ load.php?cat=$1 [L,QSA]这是满足这个问题你问,但你的规则有工具和 /页/ ,这是不是你的问题的一部分都没有。
That satisfies the question you're asking, but your rules have stuff for /page/, which isn't part of your question at all.
更多推荐
获得价值htaccess以及分页的限制
发布评论