Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 除索引页外,所有页面都在加载?_.htaccess - Fatal编程技术网

.htaccess 除索引页外,所有页面都在加载?

.htaccess 除索引页外,所有页面都在加载?,.htaccess,.htaccess,我这里有一个htaccess代码。除主页外,所有页面都可以使用重定向。我在conf文件中也做了更改,但没有用,请帮助。它说当我点击主页链接时找不到对象 DirectoryIndex index.php RewriteEngine on AddDefaultCharset UTF-8 RewriteCond %{HTTP} =on RewriteRule ^home/?$ index.php [NC,L,QSA] RewriteRule ^about-us/?$

我这里有一个htaccess代码。除主页外,所有页面都可以使用重定向。我在conf文件中也做了更改,但没有用,请帮助。它说当我点击主页链接时找不到对象

DirectoryIndex index.php
RewriteEngine on
AddDefaultCharset UTF-8
RewriteCond %{HTTP} =on

RewriteRule ^home/?$         index.php [NC,L,QSA]
RewriteRule ^about-us/?$         about.php [NC,L,QSA]
RewriteRule ^quick-service/?$     quick_service.php [NC,L,QSA]
RewriteRule ^road-side/?$     road_side.php [NC,L,QSA]
RewriteRule ^video-visualization/?$     video_visual.php [NC,L,QSA]
RewriteRule ^distance-approach/?$     distance_approach.php [NC,L,QSA]
RewriteRule ^pickup-drop/?$     pickup_drop.php [NC,L,QSA]
RewriteRule ^checking-status/?$     checking_status.php [NC,L,QSA]
RewriteRule ^genuine-parts/?$     genuine_parts.php [NC,L,QSA]
RewriteRule ^book-vehicle/?$     book_vehicle.php [NC,L,QSA]
RewriteRule ^Sign-In/?$     login.php [NC,L,QSA]
RewriteRule ^Register/?$     register.php [NC,L,QSA]
RewriteRule ^purchase-parts/?$     purchase.php [NC,L,QSA]
RewriteRule ^contact/?$     contact.php [NC,L,QSA]
RewriteRule ^service-centers/?$     service_centers.php [NC,L,QSA]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

或者/home工作?/“works”/home不工作您使用哪个apache版本?版本2.0 apache或者/home工作?/“works”/home不工作您使用哪个apache版本?版本2.0 apache