Apache htaccess重写

Apache htaccess重写,apache,.htaccess,redirect,Apache,.htaccess,Redirect,我现在使用: RewriteEngine on RewriteRule !^index.html http://samedomain.com [L,R=301] 这样所有的查询都会转到…(通常它会加载index.html) html被排除在外,因此不会出现无休止的循环 我开得很好。。它不会被重定向。 对子页面的其他请求被重定向到 但它不会打开页面 如果您能告诉我如何将所有请求重定向到 以及如何排除2个文件(index.html和image.jpg) 被排除在重新路由之外 thx chris这

我现在使用:

RewriteEngine on 
RewriteRule !^index.html http://samedomain.com [L,R=301]
这样所有的查询都会转到…(通常它会加载index.html) html被排除在外,因此不会出现无休止的循环

我开得很好。。它不会被重定向。 对子页面的其他请求被重定向到 但它不会打开页面

如果您能告诉我如何将所有请求重定向到 以及如何排除2个文件(index.html和image.jpg) 被排除在重新路由之外

thx
chris

这是一个服务器故障问题。
RewriteCond %{REQUEST_URI} !^/?index\.html$
RewriteCond %{REQUEST_URI} !^/?image\.jpg$
RewriteRule /?(.*) http://samedomain.com/$1 [L]