无法在zend框架工作中访问管理面板?

时间:2016-11-18 09:37:33

标签: php .htaccess zend-framework zend-framework2

我正在使用zend framework2和Android购物应用程序,该网站托管在godaddy。

当我访问我的index.php(http://mytomatoapp.com/tomato_webservice/admin/public/index.php)页面时,我收到以下错误。

A 404 error occurred
Page not found.
The requested URL could not be matched by routing.
No Exception available

当我访问我的管理面板(http://admin.mytomatoapp.com/adminpanel/auth/login)时,我收到以下错误。

Not Found

The requested URL /adminpanel/auth/login was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

我创建了一个子域名(admin.mytomatoapp.com),其路径为public_html / admin,而我的.htaccess文件位于public_html / tomato_webservice / admin位置

RewriteEngine On
RewriteRule ^.htaccess$ - [F]
RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]
RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^public/.*$ /public/index.php [NC,L]
RewriteCond %{HTTP_HOST} ^admin\.mytomatoapp\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.admin\.mytomatoapp\.com$
RewriteRule ^/?$ "http\:\/\/mytomatoapp\.com\/admin" [R=301,L]
该位置的

和.htaccess(public_html / tomato_webservice / admin / public)是

RewriteEngine On
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# The following rewrites all other queries to index.php. The 
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to 
# allow proper resolution of the index.php file; it will work
# in non-aliased environments as well, providing a safe, one-size 
# fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]

任何人都可以找出问题并帮助我,我被困在这几天。

0 个答案:

没有答案