网站根目录 cmd 新建 .htaccess 文件,内容参考如下: ○ 反向代理 RewriteEngine On RewriteCompatibility2 On RepeatLimit 32 RewriteBase RewriteCond %{HTTP:Host} ^api.c12345.com$ RewriteProxy (.*) http://api.c12345.com:8083$1 [NC,P,H] ○ 地址重新 RewriteEngine on RewriteBase / RewriteRule ^get-(.*).html /get.asp?id=$1 ○ 配置参考 # Helicon ISAPI_Rewrite configuration file # Version 3.1.0.73 RewriteEngine On RewriteCompatibility2 On RepeatLimit 32 RewriteBase # unsupported directive: [ISAPI_Rewrite] # 3600 = 1 hour # unsupported directive: CacheClockRate 3600 # Block external access to the httpd.ini and httpd.parse.errors files RewriteRule ^/httpd(?:\.ini|\.parse\.errors).*$ / [NC,F,O] # Block external access to the Helper ISAPI Extension RewriteRule ^.*\.isrwhlp$ / [NC,F,O] RewriteCond %{HTTP:Host} ^www\.a\.com$ #apache域名整个重写 RewriteProxy (.*) http\://localhost:8080$1 [I,U] #文件夹重写 RewriteProxy ^/aa/(.*) http\://localhost:8080 [I,U]