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
Apache 怪异的flash、.html.htm和/home.html-如何更改站点';s家_Apache_.htaccess - Fatal编程技术网

Apache 怪异的flash、.html.htm和/home.html-如何更改站点';s家

Apache 怪异的flash、.html.htm和/home.html-如何更改站点';s家,apache,.htaccess,Apache,.htaccess,我在看一个朋友的网站,它是5年前建成的,而且非常陈旧。网址是 网站的结构是有一个index.htmh和一个 我要做的是将301重定向从/home.html放置到index.html 并将代码从home.html移到index.html 我试着这样做: # THE TWO LINES BELOW WERE ADDED BY WEB.COM SO THAT YOUR SITE USES PHP4 INSTEAD OF PHP5 AddHandler php4-script .php Action p

我在看一个朋友的网站,它是5年前建成的,而且非常陈旧。网址是

网站的结构是有一个index.htmh和一个

我要做的是将301重定向从/home.html放置到index.html

并将代码从home.html移到index.html

我试着这样做:

# THE TWO LINES BELOW WERE ADDED BY WEB.COM SO THAT YOUR SITE USES PHP4 INSTEAD OF PHP5
AddHandler php4-script .php
Action php4-script /system-cgi/php4

Redirect 301 /home.html http://www.crystalvine.com/index.html
但由于某种原因,它并不像我想象的那样工作

301重定向会做什么呢

谢谢

将其更改为

Redirect 301 /home\.html http://www.crystalvine.com/index.html
或者试试下面的方法

RewriteEngine On
RewriteBase /

RewriteRule ^home\.html$ http://www.crystalvine.com/index.html [NC,L,R=301]