2017-02-04 62 views
1

我最近没有更改过xampp中的任何内容,直到昨天才正常工作。找不到对象 - XAMPP

但现在我得到这个错误:

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 

我不知道发生了什么事,因为这是工作,直到昨天。

而且我不得不说这个地址localhost/phpmyadmin工作正常,只是我的项目地址像localhost/project22不工作。

这个page和这个page不能帮助我。

+0

你有任何改变之间的东西? Apache conf。,操作系统,.. – Hatef

+0

@Hatef否我没有 –

+0

你被标记为php/mysql,但没有相关的代码。任何'.htaccess'规则添加?并在文件夹中有索引文件? –

回答

2

最后它得到了由XAMPP配置文件中添加一个别名解决即httpd-xampp.conf

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

没有更改,这似乎是一些环境问题与XAMPP

+0

但是,这仅适用于'index.php'页面。对于其他网页不起作用。 –

+0

什么是其他页面中的错误 –

+0

我自己解决了这个问题 –

0

嘛,我不是,如果它确定将为你工作,但你可以尝试这种方法:

- 创建一个新的.htaccess(如果你有)并将其放在你的项目文件夹。

然后添加就可以了下面的代码:

<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> 

然后刷新页面。