这是什么?
转换:
http://name.com/pro/weblog/index.php?rayan_cat=23&rayan_cat_in=25
至:
http://name.com/pro/weblog/23/25/
如果为index.php,则时间未知
发布于 2011-03-10 18:33:54
这叫做URL重写。请参阅:http://httpd.apache.org/docs/current/mod/mod_rewrite.html
发布于 2011-03-10 18:35:31
RewriteEngine On
RewriteCond %{HTTP_HOST} ^http://Yoururl/
RewriteRule (.*) http://yoururl//$1 [R=301,L]
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)/([0-9]+)$ index.php?rayan_cat=$1&rayan_cat_in=$2
RewriteRule ^([a-zA-Z0-9_-]+)/([0-9]+)/$ index.php?rayan_cat=$1&rayan_cat_in=$2替换您的URL并将文件保存为根文件夹中的.htaccess
现在,您可以使用GET方法获取参数值。
https://stackoverflow.com/questions/5258399
复制相似问题