Mod rewrite 重写.htaccess
我想换衣服 /php?do=/pages/ 到 /html?do=/pages/ 我的代码不起作用Mod rewrite 重写.htaccess,mod-rewrite,Mod Rewrite,我想换衣服 /php?do=/pages/ 到 /html?do=/pages/ 我的代码不起作用 RewriteCond %{THE_REQUEST} ^[A-Z]+\s([^\s]+)\.php?do=\s RewriteRule .* %1.html [R=301,L] RewriteRule ^(.*)\.html$ $1.php 您可以这样做: <IfModule mod_rewrite.c> RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]+\s([^\s]+)\.php?do=\s
RewriteRule .* %1.html [R=301,L]
RewriteRule ^(.*)\.html$ $1.php
您可以这样做:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/([A-Za-z0-9_-.]*).php?do=(.*)
RewriteRule .* /%1.html?do=%2 [R=301,L]
</IfModule>
改写成
everything.html?do=anything
请定义“不工作”:无法工作内部服务器错误,我想更改为/index.html?do=/anything/
everything.html?do=anything