LoginSignup
0
0

More than 3 years have passed since last update.

CAKEPHP3 遷移時のURLに意図しない「webroot」が付与されてしまう

Posted at

cakephp3フレームワークを使ってウェブサービスを構築中です。

server requestによる遷移処理について原因がわからず困っています。

.htaccessなども怪しいと思ったんですが、これまで遷移できてたのが、できなくなっていたので、とても不思議に思っています。
以下のコントローラ側のリンクをトップページに設置しています。
app/naha
  ・
  ・
  ・
app/uruma

上記リンクの中で何故か、app/nahaの方だけ遷移できません。
serverRequestオブジェクト内のUrlには、「werbroot」が付与されています。
結果このようなエラーが出ます。
「The requested address 'app/webroot/naha/' was not found on this server.」

nahaControllerのindexアクションに遷移するはずなんですが…。

以下、「webroot」配下の「.htaccess」になります。


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

以下「webroot」 配下のディレクトリになります。

|-backup
|-bin
|-config
| |-api_config
| |-schema
|-logs
|-plugins
|-src
| |-Console
| |-Controller
| | |-areaController
| | |-GinowanController
| | |-IshigakijimaController
| | |-MiyakojimaController
| | |-NagoController
| | |-NahaController
| | |-NanjoController
| | |-OkinawashiController
| | |-TomigusukuController
| | |-UrasoeController
| | |-UrumaController
| |-Util
| |-View
|-tests
|-tmp
| |-bake
| |-cache
|-vendor
|-webroot
| |-bk
| |-cache
| |-css
| |-img
| | |-cast
| | |-ginowan
| | |-miyako
| | |-naha
| | |-owner
| | |-urasoe
| |-js
| |-lib
| |-module
| |-tmp

どうか、お助け願えないでしょうか。
よろしくお願いいたします。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0