English 中文(简体)
一部改写规则,能够重写多卢尔语(Mod_rewrite)
原标题:One rewrite rule capable of rewriting multiple urls to their https (mod_rewrite)

我正试图提出一个单一的改写规则,即,如果它含有一些字眼的话,将它重新贴在它的网页上。

例如:[所有这些案件的重新适用一条规则]

$http://www.example.com/account/login  to  https://www.example.com/account/login
$http://www.example.com/checkout  to  https://www.example.com/checkout
$http://www/example.com/info/contact  to  https://www.example.com/info/contact

我不知道为什么会这样做。

$RewriteCond %{HTTPS} off
$RewriteCond %{REQUEST_URL} checkout|account
$RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
最佳回答

类似:

RewriteCond %{HTTPS} off
RewriteRule ^(account/.+|checkout|info/contact)$ https://www.example.com/$1 [R=301,L]
问题回答

暂无回答




相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签