1

.htaccessルートフォルダーに次のファイルがあります。

<Files .htaccess>
    Order allow,deny
    Deny from all
</Files>

DirectoryIndex index.php

ErrorDocument 404 /not-found.php

RewriteEngine On
RewriteBase /
RewriteRule ^@([^/]+)$ /users.php?username=$1
RewriteRule ^@([^/]+)/followers$ /followers.php?username=$1
RewriteRule ^@([^/]+)/highlights$ /highlights.php?username=$1
RewriteRule ^posts/([^/]+)(|/)$ /posts.php?id=$1
RewriteRule ^([^\.]+)$ $1.php

アドレスバーに書き込むlocalhostと正しくインデックスファイルを呼び出しますが、サブフォルダーにアクセスするlocalhost/support/と、このフォルダーにあるインデックスファイルが検出されません。

最後の行を削除するRewriteRule ^([^\.]+)$ $1.phpと機能しますが、他のファイルが適切に機能するために必要です。

4

0 に答える 0