小编RuZ*_*uZk的帖子

子文件夹的重写规则

我有文件结构

   索引.php
   .htaccess
   新闻/index.php
   新闻/.htaccess

首先.htaccess:

    重写引擎开启
    重写基数 /

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteCond %{REQUEST_URI} !^/news/
    重写规则。/index.php [L]

第二个(新闻/.htaccess)

    重写引擎开启
    重写规则。/index.php

请求http://test.t/news/news/61处理第一个 index.php 但我需要做第二个

我为第一个 .htaccess 尝试了更多选项,但没有成功

php apache .htaccess mod-rewrite

5
推荐指数
1
解决办法
4046
查看次数

标签 统计

.htaccess ×1

apache ×1

mod-rewrite ×1

php ×1