找不到子文件夹.htaccess


Subfolder .htaccess not found

嗨,朋友们,我得到这个错误,任何人都可以告诉我如何解决这个错误。我的htaccess文件是这样的:

#Options +FollowSymLinks -MultiViews
#RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME}'.php -f
RewriteRule ^ - [L]
RewriteRule ^friends/(['w-]+)/?$ /friends.php?username=$1 [L,QSA]
RewriteRule ^followers/(['w-]+)/?$ /followers.php?username=$1 [L,QSA]
RewriteRule ^settings/(['w-]+)/?$ /settings.php?username=$1 [L,QSA]
RewriteRule ^messages/(['w-]+)/?$ chat.php?message_username=$1 [L,QSA]
RewriteRule ^following/(['w-]+)/?$ following.php?username=$1 [L,QSA]
RewriteRule ^following/(['w-]+)/([0-9]+)/?$ following.php?username=$1&page=$2 [L,QSA]
RewriteRule ^followers/(['w-]+)/?$ followers.php?username=$1 [L,QSA]
RewriteRule ^followers/(['w-]+)/([0-9]+)/?$ followers.php?username=$1&tpage=$2 [L,QSA]
RewriteRule ^photos/(['w-]+)/?$ userphotos.php?username=$1&page=$2 [L,QSA]
RewriteRule ^(.*/([a-zA-Z0-9_-]+)|([a-zA-Z0-9_-]+))$ profile.php?username=$1 [L,QSA]

未找到

请求的URL/profile/following/demo在此服务器上找不到。

Apache/2.2.15 (CentOS) Server at prototype.kofendurance.com端口80

我也得到相同的错误所有htaccess rewriterrule

你跳过文件或目录的第一条规则是不正确的,你需要取消开头行的注释:

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /profile/
# skip real files and directories from all the rules
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# rest of the rules