0

I have this .htaccess file:

Options +FollowSymLinks
RewriteEngine On

# put trailing slash
RewriteCond %{REQUEST_METHOD}  !=POST
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]

# to make pretty urls
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?get=$1/ [QSA,L]

The problem is when I look at firebug's console, I see that all resources (.js, .css) are getting called twice.

What is wrong with this htaccess file?

Thanks a lot! (and sorry about my bad english)

4

1 回答 1

0

将您的第一条规则修改为:

# put trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_METHOD}  !=POST
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]

确保在新浏览器中进行测试以避免缓存问题。

于 2013-10-16T19:04:54.803 回答