如何将{REQUEST_URI}存储在variables中,对其进行处理,然后在RewriteCond或RewriteRule中使用它?
基本上,这是我期待的。
1.)获取{REQUEST_URI}并将.shtml改为.html,将其存储在名为URL_MOD的variables中
2.)testing新创build的名为URL_MOD的variables名称的文件是否存在
3.)根据testing结果,将用户redirect到URL_MOD追加的域。
RewriteCond %{REQUEST_FILENAME} (.*)\.html RewriteCond %{REQUEST_URI} (.*)\.html RewriteCond %1.shtml -f RewriteRule (.*) http://new.example.com%2.shtml