首先,我知道有上的.htaccess设置相当多的职位,但我看不到一个一致的答案,所以我不知道什么是最好的办法。所以请裸陪我,如果我重复的东西从其他地方。
First, I realise there are quite a few posts on .htaccess settings but I can't see a consistent answer so I'm wondering what is the best approach. So please bare with me if I'm repeating something from elsewhere.
我在执行更新到网站,所以我想创建一个302临时重定向,除了一个特定页面的所有网页。
易腐press对的,我现在使用的选项1的话题两篇文章:
perishablepress has two articles on the topic for which I am currently using option 1:
这些物品是指修改的所有页面,在这里我有一个网页我想保持住。 (因为它的推移,我努力让选项2,在所有的工作)。谁能告诉我什么是实现这一目标的最佳途径?
These article refer to amending all pages, where as I have one page I want to keep live. (As it goes I'm struggling to get option 2 to work at all). Can anyone tell me what is the best way to achieve this?
要澄清,我想:
感谢您的帮助,我是相当新的的.htaccess!
Thanks for any help, I'm rather new to .htaccess!
推荐答案您可以尝试这样的:
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !contact-us.html [NC] RewriteCond %{REQUEST_URI} !coming-soon.html [NC] RewriteCond %{REQUEST_URI} \.(html|htm)/? [NC] RewriteRule .* coming-soon.html [R=301,L]更多推荐
最好的办法,为的.htaccess临时重定向(302)与异常
发布评论