如何允许使用.htaccess访问1个特定网址?

时间:2011-11-28 18:55:23

标签: .htaccess redirect

我有一个完美的htaccess:

rewriteengine on
rewritecond %{HTTP_HOST} ^www.somedomain.com$ [OR]
rewritecond %{HTTP_HOST} ^somedomain.com$
rewriterule ^$ "http\:\/\/somedomain\.com\/n" [R=301,L] #4ecde5cb862ff


addhandler x-httpd-php5-cgi .php5
addhandler x-httpd-php5-cgi .php

我想要的是允许访问仍在服务器上的旧网址“http://somedomain.com/footer/ingredients/index.htm”

我该怎么做?我几乎不知道如何处理特定情况下的htaccess,例如这个= / url的最后部分可能会更改为“page2.htm”直到“page6.htm”。

修改

我已经尝试添加

RewriteCond %{REQUEST_URI} !^/footer

在重写引擎之后以及

RewriteCond %{REQUEST_URI} !^/footer/?$

但这些都不起作用= /

0 个答案:

没有答案