1
一个获取参数的在我的.htaccess我有以下规则被不创建API
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule productApi/(.*)$ productApi.php?category=$1 [QSA,NC,L]
</IfModule>
当我与MYSERVER/productAPI /布 要求给它装上productAPI.php但是$ _REQUEST是空的,它本应是一个数组[“类别” =>“布”]
我已经建立了对mod重写trace8日志和我得到以下日志
add path info postfix: D:/myshop/productApi.php -> D:/myshop/productApi.php/cloths
strip per-dir prefix: D:/myshop/productApi.php/cloths -> productApi.php/cloths
applying pattern 'productApi/(.*)$' to uri 'productApi.php/cloths'
pass through D:/myshop/productApi.php
add path info postfix: D:/myshop/productApi.php -> D:/myshop/productApi.php/cloths
strip per-dir prefix: D:/myshop/productApi.php/cloths -> productApi.php/cloths
applying pattern 'productApi/(.*)$' to uri 'productApi.php/cloths'
pass through D:/myshop/productApi.php
strip per-dir prefix: D:/myshop/cloths -> cloths
applying pattern 'productApi/(.*)$' to uri 'cloths'
pass through D:/myshop/cloths
我已经阅读并改变了许多不同的东西,但它并没有帮助我。 我不知道是什么问题,但它如何处理重写规则有问题。 任何帮助将不胜感激