可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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.