网站伪静态方法一学就会

更新时间:2019-09-26 16:37:55点击:19148 营销工具,营销神器

把一下源码复制到记事本中,然后保存为htaccess.txt文件,上传到网站的根目录下,最后一步就是重命名文件,把htaccess.txt文件修个为.htaccess文件名即可。修改后此文件自动隐藏生效了。(如有不懂可加微信13703648332了解,有求必应)


http://www.taimala.com/news.php?lang=1
http://www.taimala.com/news.php?cid=20&lang=1
http://www.taimala.com/news.php?cid=20

http://www.taimala.com/newsshow.php?cid=40&id=149&lang=1
http://www.taimala.com/newsshow.php?cid=20&id=94

http://www.taimala.com/news.php?lang=1&page=7
http://www.taimala.com/news.php?page=6

http://www.taimala.com/case.php?lang=1
http://www.taimala.com/case.php?cid=16&lang=1
http://www.taimala.com/show.php?cid=16&id=73&lang=1
http://www.taimala.com/case.php?lang=1&page=3


http://www.taimala.com/malatang.php?lang=1
http://www.taimala.com/malatang.php?cid=26&lang=1
http://www.taimala.com/malatangshow.php?cid=27&id=146&lang=1
http://www.taimala.com/malatang.php?lang=1&page=7

RewriteRule ^news-([0-9]+)-([0-9]+)\.html$ news.php?lang=$1&page=$2
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^news-([0-9]+)\.html$ news.php?lang=$1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^news-([0-9]+)-([0-9]+)\.html$ news.php?cid=$1&lang=$2
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^newsshow-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ newsshow.php?cid=$1&id=$2&lang=$3&page=$4
RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^case-([0-9]+)-([0-9]+)\.html$ case.php?lang=$1&page=$2
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^case-([0-9]+)\.html$ case.php?lang=$1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^show-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ show.php?cid=$1&id=$2&lang=$3&page=$4
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^case-([0-9]+)-([0-9]+)\.html$ case.php?cid=$1&lang=$2
RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^malatang-([0-9]+)\.html$ malatang.php?lang=$1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^malatang-([0-9]+)-([0-9]+)\.html$ malatang.php?lang=$1&page=$2
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^malatangshow-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ malatangshow.php?cid=$1&id=$2&lang=$3&page=$4
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^malatang-([0-9]+)-1\.html$ malatang.php?cid=$1&lang=1

推荐阅读