私のプロジェクトには次のアーキテクチャがあります。
Application/ Modules/ Example/ Controllers/ Views/ Web/ css/ style.css img/ Core/ index.php
すべての REQUET_URI を index.php にリダイレクトしたいと考えています。これは、次の .htaccess コンテンツを使用すると簡単です。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !index\.php
RewriteRule ^(.*)$ index.php/$1 [L]
しかし、今 www.domain.ext/Application/Modules/Example/Web/css/style.css をリクエストしてもうまくいきません。「モジュール」の URL を www.domain.ext/ModuleName/[...] のように書き換えたいので、これは私が期待するものです。前のリンクでは、ファイル www.domain.ext/Application/Modules/ModuleName が得られます。 /ウェブ/[...]
例: www.domain.ext/ModuleName/css/style.css は、ファイル www.domain.ext/Application/Modules/ModuleName/Web/css/style.css を提供します www.domain.ext/ModuleName についても同じです/my_file.xml => www.domain.ext/Application/Modules/ModuleName/Web/my_file.xml など..
しかし、私はそれを行う方法がわかりません。すべてのディレクトリを「すべてから拒否」したい。
ありがとう :)