找不到对象-XAMPP
最近我的找不到对象-XAMPP,xampp,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.
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
不工作
这个和这个都帮不上我的忙。最后在XAMPP配置文件中添加了一个别名,即
httpd XAMPP.conf
Alias /project22 "C:/xampp/project22/"
<Directory "C:/xampp/project22">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Require all granted
</Directory>
Alias/project22“C:/xampp/project22/”
选项索引跟随符号链接多视图执行CGI
允许超越所有
要求所有授权
没有任何更改,似乎是XAMPP的一些设置问题最终通过在XAMPP配置文件中添加别名解决了,即
httpd XAMPP.conf
Alias /project22 "C:/xampp/project22/"
<Directory "C:/xampp/project22">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Require all granted
</Directory>
Alias/project22“C:/xampp/project22/”
选项索引跟随符号链接多视图执行CGI
允许超越所有
要求所有授权
没有任何更改,XAMPP似乎存在一些设置问题。我不确定它是否适用于您,但您可以尝试以下方法: -创建一个新的.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>
重新启动发动机
重写基/
重写条件%{HTTP_HOST}^www\.(.*)$[NC]
重写规则^(.*)$http://%1/$1[R=301,L]
# !重要!在这里设置您的基础,不要忘记尾随和前导
#砍。
#如果您的页面位于
# http://www.example.com/mypage/test1
#然后使用
#重写base/mypage/test1/
重写基/
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php?/$1[L]
#如果我们没有安装mod_rewrite,所有404
#可以发送到index.php,一切正常。
#提交人:ElliotHaughin
ErrorDocument 404/index.php
然后刷新您的页面。嗯,我不确定它是否适合您,但您可以尝试以下方法: -创建一个新的.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>
重新启动发动机
重写基/
重写条件%{HTTP_HOST}^www\.(.*)$[NC]
重写规则^(.*)$http://%1/$1[R=301,L]
# !重要!在这里设置您的基础,不要忘记尾随和前导
#砍。
#如果您的页面位于
# http://www.example.com/mypage/test1
#然后使用
#重写base/mypage/test1/
重写基/
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php?/$1[L]
#如果我们没有安装mod_rewrite,所有404
#可以发送到index.php,一切正常。
#提交人:ElliotHaughin
ErrorDocument 404/index.php
然后刷新您的页面。更改数据库名称后,我遇到了类似的错误。 我使用search&replace插件将旧名称更改为新名称,但在除主页之外的所有页面上都遇到了相同的错误。 为了解决此错误,我所做的只是将数据库名称(在.htaccess文件上)从旧名称更改为新名称,位于上述代码之间,如下所示:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /"WRITE YOUR NEW DATABASE NAME HERE"/
RewriteRule ^index\.php$ - [L]
.
.
.
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /"WRITE YOUR NEW DATABASE NAME HERE"/index.php [L]
</IfModule>
重新启动发动机
RewriteBase/“在此处写入新数据库名称”/
重写规则^index\.php$-[L]
.
.
.
重写cond%{REQUEST_FILENAME}-D
重写规则/“在此处写入新数据库名称”/index.php[L]
更改数据库名称后,我遇到了类似的错误。
我使用search&replace插件将旧名称更改为新名称,但在除主页之外的所有页面上都遇到了相同的错误。
为了解决此错误,我所做的只是将数据库名称(在.htaccess文件上)从旧名称更改为新名称,位于上述代码之间,如下所示:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /"WRITE YOUR NEW DATABASE NAME HERE"/
RewriteRule ^index\.php$ - [L]
.
.
.
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /"WRITE YOUR NEW DATABASE NAME HERE"/index.php [L]
</IfModule>
重新启动发动机
RewriteBase/“在此处写入新数据库名称”/
重写规则^index\.php$-[L]
.
.
.
重写cond%{REQUEST_FILENAME}-D
重写规则/“在此处写入新数据库名称”/index.php[L]
我之所以陷入这个问题,是因为我发现自己错过了xampp安装,我有一个xampp安装(c:/xampp)
,然后在其中安装了另一个(c:/xampp/xampp)
所以,当我在第一个xampp的htdocs中添加文件并尝试运行它时,我发现我运行了第二个xammp,所以找不到对象
为了快速解决这个问题,我在第二个xampp安装路径中添加了php文件,即c:/xampp/xampp/htdocs
但一般来说,您应该安装一个xampp
因此,请检查是否已安装服务器两次,因为如果将文件添加到不同运行xampp路径的htdocs
中,则会产生冲突
我之所以会遇到这个问题,是因为我错过了一些xampp安装,我有一个xampp安装
(c:/xampp)
,然后在其中安装了另一个(c:/xampp/xampp)
所以,当我在第一个xampp的htdocs中添加文件并尝试运行它时,我发现我运行了第二个xammp,所以找不到对象
为了快速解决这个问题,我在第二个xampp安装路径中添加了php文件,即c:/xampp/xampp/htdocs
但一般来说,您应该安装一个xampp
因此,请检查是否已安装服务器两次,因为如果将文件添加到不同运行xampp路径的htdocs
中,则会产生冲突
配置文件,即
httpd xampp.conf
Alias /project22 "C:/xampp/project22/"
<Directory "C:/xampp/project22">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Require all granted
</Directory>
扎根
Alias / "C:/xampp/htdocs/"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Require all granted
</Directory>
Alias/“C:/xampp/htdocs/”
选项索引跟随符号链接多视图执行CGI
允许超越所有
要求所有授权
配置文件,即httpd xampp.conf
Alias /project22 "C:/xampp/project22/"
<Directory "C:/xampp/project22">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Require all granted
</Directory>
扎根
Alias / "C:/xampp/htdocs/"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Require all granted
</Directory>
Alias/“C:/xampp/htdocs/”
选项索引跟随符号链接多视图执行CGI
允许超越所有
要求所有授权
您是否有可能在两者之间做了一些更改?Apache配置,操作系统,…@Hate