我希望将除了根URL(
以下是我目前的代码,但它没有起作用。
我需要的规则如下:
/
和/index.php
)以及JS/CSS和图片资源之外的所有URL重定向到另一个URL。所有资源都包含在/assets目录中。以下是我目前的代码,但它没有起作用。
RewriteEngine on
RewriteRule ^(.*)\.(?!js|css)([^.]*)$ $1\.php
RewriteCond %{REQUEST_URI} !^.assets$
RewriteCond %{REQUEST_URI} !/index.php$
RewriteCond %{REQUEST_URI} !/style.php$
RewriteCond %{REQUEST_URI} !/$
RewriteRule $ http://berlincallingny.eventbrite.com [R=302,L]
我需要的规则如下:
- 不要重写任何包含“assets”的URL
- 不要重写index.php
- 不要重写style.php
- 不要重写根URL
- 不要重写任何包含.css或.js的URL