1
我需要一些帮助改写以下网址的:htaccesss重写将无法正常工作
example.com/news/top/2/
example.com/news/top/
这是我目前的.htaccess文件
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/\.]+)/([^/\.]+) index.php?view=$1&task=$2
RewriteRule ^news/([^/\.]+)/([0-9]+) index.php?view=news&task=$1&page=$2 [L]
RewriteRule ^news index.php?view=news
我认为这会工作,但每当我访问= example.com/news/top/2/ 我尝试呼应了$ _GET [“页”]它说,变量是没有定义的。
somone pleas可以帮助解决这个神经断裂问题吗?
谢谢你这个工作。 – rokkz
@rokkz:很高兴知道它为你工作。 – anubhava