Error :The requested url /users/view is not found on this server

一笑奈何 提交于 2020-01-24 20:02:08

问题


I have installed the WAMP server in my windows machine .I have downloaded a simple cakephp application called "samplecake" from net and copy that application to c:WAMP/www And try to run the application using http:localhost/samplecake then it shows the login page (in routes.php i have redirected the '/' to users/login).In my controller the afterlogin redirect to /users/view , But after the successful login it will redirect to /users/view

but it shows an error:Not Found

The requested URL /users/view was not found on this server.

I have tried all the actions that are present in user_controller like /users/add, /users/edit but it shows the same error Not Found he requested URL /users/add was not found on this server

How can i solve this Not found url problem if anyone knows please help me thanks in advance.............


回答1:


Have you enabled the rewrite module in WAMP? This will make the URL rewriting in .htaccess possible.

Info on how to do so: http://www.anmsaiful.net/blog/php/enable-apache-rewrite-module.html




回答2:


Seems like a .htaccess is missing. Please check if you have copied those. Maybe your Windows hid those files, make sure to have enabled that you can see all files on your system.

  1. Open explorer
  2. Select the Tools menu and click Folder Options.
  3. After the new window appears select the View tab.
  4. Put a checkmark in the checkbox labeled Display the contents of system folders.
  5. Under the Hidden files and folders section select the radio button labeled Show hidden files and folders.

Also, please consider working on your accept rate. Please have a view into the FAQ why this is important.




回答3:


1 more addition to the above:

If its windows go to your wamp folder, Under Folder and search options >> Check the option "Display the extensions for known file types" to verify its a valid php file.

Case: you create a text file and you save it as test.php if this option "Display the extensions for known file types" in unchecked. It appears: test.php instead of test.php.txt



来源:https://stackoverflow.com/questions/6119330/error-the-requested-url-users-view-is-not-found-on-this-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!