简体   繁体   中英

“Unable to resolve the request” after moving to a new directory

I have a website that's running correctly, now to setup a beta environment I copied the whole structure into a subfolder. So instead of var/www I have var/www/beta/.

This worked on my old server but on my new one its throwing me the "Unable to resolve the request" error. I've changed all the rights and checked the linking of the files. The main page shows up correctly but when clicking a link that goes deeper into the site it gives me the 404 error.

When I set the default controller a link will work. When I try to go to that url myself it will not, I'm thinking something is up with my urlManager ? (So www.website.com/xx/yy/2 wont work but defaulController = 'xx/yy/2'; and go to www.website.com will show the page)

Any help / insight would be appreciated.

If you're using apache, you'll need to update your RewriteBase, like this:

in var/www/beta/.htaccess, add:

RewriteEngine On
RewriteBase /beta/

This should do it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM