我正试图通过Chrome浏览器访问我的examplep上的localhost,但我收到了以下错误消息:
Object not found!
The requested URL was not found on this server. If you entered the
URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
Apache和MySQL都打开了,所以我不明白。
您可以很好地访问"localhost"。
"404:file not found"错误表示一旦连接到localhost,服务器就找不到请求的文件。
附录:
也许可以尝试在以下文件中创建一个名为test.html的常规html文件你的vhosts不起作用。然后尝试访问该网址。那个应该能给你一些线索,让你知道问题出在哪里Gohn67
这是个好建议。试试看。具体来说:
1) 创建以下五个文件:
-
C:/examplep/htdocs/dummy-host.localhost/test.html
-
C:/examplep/htdocs/my/test.html
-
C:/examplep/htdocs/launcher/public_html/test.html
-
C:/examplep/htdocs/website/httpdocs/test.html
-
C:/examplep/htdocs/my/test.html
2) 确保每个目录都存在,并且每个目录都有一个"test.html",其中的中有"TESTING 1…2…3"
3) 在浏览器中尝试以下五个URL中的每一个:
- http://localhost/test.html
- http://itutormaths.web/test.html
- http://itutormaths.mod/test.html
- http://itutormaths.hub/test.html
- http://my.itm/test.html
4) 报告您从每个浏览器URL 得到的确切错误
导航到此处:
http://localhost/
如果成功的话,一切都会好起来的。
将wordpress粘贴到xampp/htdocs
,应该不会出现任何错误。
我遇到了类似的问题,我就是这样解决的:
- 在XAMPP中打开Apache模块上的httpd:conf文件(单击Congif按钮)
- 滚动浏览文件-在第一组评论(#)之后有一行代码,上面写着"听80"。将其更改为81(或您想要使用的任何其他端口)
-
打开web浏览器并在网址中明确定义端口:
127.0.0.1:81
可能或可能为您工作;我最初遇到的问题是Apache根本无法启动,这就是为什么我更改了端口号(不想弄清楚哪个服务正在使用端口80——如果你想的话,你可以在命令提示符下使用命令netstats-a或netstats-b来弄清楚)
希望这能帮助
我刚刚遇到了这个问题,并通过创建.htaccess文件解决了这个问题。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /yourfoldername/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>