Object not found - XAMPP

匿名 (未验证) 提交于 2019-12-03 10:10:24

问题:

I've not changed anything in my xampp recently, and it was working correctly until yesterday.

But now I got this error:

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  localhost Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3 

I don't know what happened, because it was working until yesterday.

And also I have to say this address localhost/phpmyadmin work correctly, just my projects address like localhost/project22 not working.

this page and this page couldn't help me.

回答1:

Finally it got solved by adding an alias in XAMPP config file namely httpd-xampp.conf

Alias /project22 "C:/xampp/project22/" <Directory "C:/xampp/project22">    Options Indexes FollowSymLinks MultiViews ExecCGI    AllowOverride All    Require all granted </Directory>  

There were no changes, It seems to be some setting issue with XAMPP



回答2:

Well, Im not sure if it will work for you but you can try this method:

-Create a new .htaccess (if you have one) and put it on your project folder.

Then add the following code on it:

    <IfModule mod_rewrite.c>   RewriteEngine On   RewriteBase /   RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]   RewriteRule ^(.*)$ http://%1/$1 [R=301,L]    # !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading   #  slashes.   # If your page resides at   #  http://www.example.com/mypage/test1   # then use   # RewriteBase /mypage/test1/   RewriteBase /   RewriteCond %{REQUEST_FILENAME} !-f   RewriteCond %{REQUEST_FILENAME} !-d   RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule>  <IfModule !mod_rewrite.c>   # If we don't have mod_rewrite installed, all 404's   # can be sent to index.php, and everything works as normal.   # Submitted by: ElliotHaughin    ErrorDocument 404 /index.php </IfModule> 

Then refresh your page.



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