如何在url中使用连字符将php重定向到html

如何在url中使用连字符将php重定向到html,php,html,apache,.htaccess,mod-rewrite,Php,Html,Apache,.htaccess,Mod Rewrite,我想重定向包含下划线的url,扩展名为php app\u development\u company.php到app development company.html中的.htaccess文件 看看我的htaccess <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^(.*\.js) gzip.php?type=js&file=$1 RewriteRule ^(.*\.css) gzip.p

我想重定向包含下划线的url,扩展名为
php
app\u development\u company.php
app development company.html
中的
.htaccess
文件

看看我的htaccess

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^(.*\.js) gzip.php?type=js&file=$1
    RewriteRule ^(.*\.css) gzip.php?type=css&file=$1
    #RewriteBase   /

    RewriteCond %{HTTP_HOST} !^$
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    #RewriteRule    ^index\.html$       index.php   [L]
    RewriteRule    ^/$      index.php   [L]
    RewriteRule    ^iphone-app-development\.html$       iphone_development.php  [L]
    RewriteRule    ^mobile-app-development-jaipur\.html$    mobile-app-development-jaipur.php   [L]
    RewriteRule    ^android-app-development\.html$      android_app_development.php     [L]

    RewriteRule    ^404\.html$      404.php     [L]
    ErrorDocument  404 https://wedigtech.com/404.html
</IfModule>

重新启动发动机
重写规则^(.*\.js)gzip.php?type=js&file=1
重写规则^(.*\.css)gzip.php?type=css&file=1
#重写基/
重写cond%{HTTP_HOST}^$
重写cond%{HTTP_HOST}^www\。[北卡罗来纳州]
重写规则^https://www.%{HTTP_HOST}%{REQUEST_URI}[R=301,L]
#重写规则^index\.html$index.php[L]
重写规则^/$index.php[L]
重写规则^iphone app development\.html$iphone_development.php[L]
重写规则^mobile-app-development斋浦尔\.html$mobile-app-development-jaipur.php[L]
重写规则^android app development\.html$android\u app\u development.php[L]
重写规则^404\.html$404.php[L]
错误文档404https://wedigtech.com/404.html
请帮我解决这个问题


感谢您在高级中使用下面的代码进行重定向

RewriteEngine On
RewriteBase /
RewriteRule index\.html index.php [NC,R]
另请参阅下面的链接


那么您想将任何
/foo-bar-baz baz abcd.html
重写为
/foo-bar-baz-baz abcd.php