我想重寫一個我的urls到漂亮的urls,但我似乎無法弄清楚。這是我嘗試過的。.htaccess漂亮的URL重寫像文件夾
我的文件夾佈局
-index.php
-.htaccess
-/product
-category.php
-index.php
-product.php
我htaccess文件
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^([^/]+)/?$ category.php?category_id=$1 [L,QSA]
</IfModule>
即時特林打開這個網址
http://example.com/product/category.php?category_id=1&category=car-and-buses
到這個網址
http://example.com/product/1/car-and-buses
一切是我的嘗試至今讓我懷念的配置錯誤或401 ..我的瀏覽器
你的.htaccess在產品'目錄裏面的任何機會? – anubhava