另一个.htaccess文件可以在子文件夹中工作


can another .htaccess file can work in subfolder

>我有一个代码点火器站点 http://piyukarts.in/mss/在mss下的.htaccess文件中包含

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on
    # Send request via index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

但是我无法访问链接http://piyukarts.in/mss/posts,但我可以访问piyukarts.in/mss/index.php/posts,使用此index.php/ after mss/

piyukarts.in/是WordPress网站,也有一个.htaccess文件

请帮忙..提前感谢很多...

我在.htaccess文件中进行了此更改,现在工作正常。

RewriteEngine On
RewriteBase /mss  
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index'.php|images|robots'.txt|css|docs|js|system)
RewriteRule ^(.*)$ /mss/index.php?/$1 [L]

回答:

另一个.htaccess文件可以在子文件夹中工作吗

是:

是的。.htaccess文件在文件路径树中的任何文件夹中的文件,都将应用于该文件。

因此,文件作为/root/home/site/includes/css/horses.css任何这些文件夹中的 HTaccess 都将应用于文件horses.css