【发布时间】:2026-01-25 13:45:01
【问题描述】:
我的 .htaccess 中有一些重写规则,我想添加一个异常子文件夹,以便当用户链接到该子文件夹时 mod_rewrite 停止重写。
我的特殊子文件夹是http://simplyservices.gr/aivali 当有人到达这个网址时,mod_rewrite 遵循我添加的规则,最后用户看不到 aivali 的内容 这是我的 .htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/aivali/ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([^/]*)\.html$ /new1/products.php?kategory=$1 [L]
RewriteRule ^([^/]*)/([^/]*)\.html$ /new1/products.php?kategory=$1&subkategory=$2 [L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)\.html$ /new1/products.php?kategory=$1&subkategory=$2&id=$3 [L]
我已经尝试了同一篇文章中提到的所有内容,但没有任何效果。我认为我的 RewriteRules 出了点问题。
谢谢
【问题讨论】:
标签: php apache .htaccess mod-rewrite url-rewriting