English 中文(简体)
cs, js .htaccess rewrite to a file
原标题:css, js .htaccess rewrite to a file

我有以下一线,但似乎行不通,任何人都能够告诉我我,我在哪里会错?

RewriteRule ^(.*).css css.php?

我有以上其他内容,但我不相信这些内容是循环的。

但是,我有另一个线以下,即任何其他档案。

RewriteRule ^(.*) index.php?

他们这样做:

RewriteRule ^(.*).css css.php?
RewriteRule ^(.*) index.php?

我只需要所有要求通过点子——先是归还单件档案内容。

最佳回答

采用以下规则。 所有申请均以<条码>cs.php为指示,所有联合提交申请均以<条码>js.php为指示。 最后一条规则,因此以后的规则不影响这一规则。

I ve also added another line, to prevent index.php redirecting to index.php in an infinite loop.

RewriteRule ^(.*).(css|js) $2.php?$1 [L]
RewriteRule ^index.php index.php [L] #Prevent infinite loops
RewriteRule ^(.*) index.php
问题回答
RewriteRule ^(.*).css css.php?$1

页: 1





相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签