Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/84.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
Php 将我的url从domani/index.html更改为domani/index_Php_Html_.htaccess - Fatal编程技术网

Php 将我的url从domani/index.html更改为domani/index

Php 将我的url从domani/index.html更改为domani/index,php,html,.htaccess,Php,Html,.htaccess,我正在尝试将我的url从domani.com/index.html更改为domain.com/index,我尝试了许多选项,但都没有成功。我使用阿鲁巴作为服务器,我不知道它的重要性和windows主机 重新编写引擎打开 重写基/ 重写条件%{HTTPS}关闭 重写cond%{HTTP:X-Forwarded-Proto}!https 重写规则^(.*)$https://%{HTTP_HOST}%{REQUEST_URI}[L,R=301] RewriteCond%{REQUEST_FILENA

我正在尝试将我的url从domani.com/index.html更改为domain.com/index,我尝试了许多选项,但都没有成功。我使用阿鲁巴作为服务器,我不知道它的重要性和windows主机

重新编写引擎打开
重写基/
重写条件%{HTTPS}关闭
重写cond%{HTTP:X-Forwarded-Proto}!https
重写规则^(.*)$https://%{HTTP_HOST}%{REQUEST_URI}[L,R=301]
RewriteCond%{REQUEST_FILENAME}.html-f

重写规则!*\。html$%{REQUEST_FILENAME}.html[QSA,L]
试试这个,应该可以用

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html [NC,L]

我尝试过,但刷新此“HTTP错误404.3-未找到”时,总是出现相同的错误1°“HTTP错误404.17-未找到”