当cakephp安装在服务器中时,无法访问PhpMyAdmin [英] Unable to access PhpMyAdmin when cakephp in installed in the server
问题描述
我试图将我的代码从localhost转移到活动域。服务器的目录如下:
I am trying to transfer my codes from localhost to a live domain. The directory of the server is like this:
-www.example.com
--app
--cake
--vendors
--plugins
-- phpMyAdmin
-- htaccess
因为cakephp处理URL,当我尝试访问www.example.com/phpMyAdmin时,cakephp抱怨找不到PhpmyAdminController。我试图改变在app / webroot / htaccess的htaccess允许phpMyAdmin的URL,但它不工作。有人可以帮忙吗?
Since cakephp deals with the URL, when i try to access www.example.com/phpMyAdmin, cakephp complains that "PhpmyAdminController could not be found". I tried to change the htaccess in the app/webroot/htaccess to allow url of phpMyAdmin but it does not work. Can someone help?
我按照以下网站的教程: http://cakebaker.42dh.com/2006/08/17/take-over-the-control-of- some-urls-from-cakephp / 。但是我更改了webroot文件夹中的htaccess而不是主文件夹。
I followed the tutorial from the following website: http://cakebaker.42dh.com/2006/08/17/take-over-the-control-of-some-urls-from-cakephp/. However i changed the htaccess in the webroot folder rather than the main folder.
我真的希望有人来帮助。
I am really hoping for someone to help.
推荐答案
可以通过修改位于app文件夹外部的 .htaccess
文件来实现。
请尝试这个。我使用这个特定的代码,它为我工作。
You can do it by modifying the .htaccess
file which is located outside app folder.
Please try with this. I'm using this particular code and its working for me.
<IfModule mod_rewrite.c>
RewriteEngine on
Rewriterule ^phpmyadmin/.*$ - [PT]
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
现在你可以运行这样的目录 http:/ /example.com/phpmyadmin
Now you'll be able to run a directory like this http://example.com/phpmyadmin
这篇关于当cakephp安装在服务器中时,无法访问PhpMyAdmin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!