This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
如果我理解正确的话,您可以从以下位置访问您的应用程序:
... 但您希望 URL 显示如下:
最简单的选择是将 cakephp 目录中的所有文件和文件夹向上移动一个级别,因为它旨在“开箱即用”,因此目录结构如下所示:
如果您希望保留包含目录的
cakephp
,那么您将需要添加自己的.htaccess
文件复制到html/
目录,告诉 Apache 您的意图。结构如下:可以从第一个 CakePHP .htaccess 文件复制其中的内容(如上所述)并稍作更改以产生您想要的结果。像这样的东西:
If I understand correctly, you can access your application from:
... but instead you want URLs to display like this:
The simplest option would be to move all the files and folders inside the
cakephp
directory up one level, as it's intended to work "out of the box", so the directory structure was like this:If you wish to keep the
cakephp
containing directory, then you will need to add your own.htaccess
file to thehtml/
directory to tell Apache of your intentions. The structure would be like this:The contents of which can be copied from the first CakePHP .htaccess file (as noted above) and altered slightly to produce the result you are after. Something like this: