Apache mod_rewrite only if request does not start with '/THEMES/'

前端 未结 4 880
借酒劲吻你
借酒劲吻你 2021-01-08 00:11

I\'m writing a CMS in PHP, and now I\'m working at the themes feature. I have a .htaccess file:

RewriteEngine ON
RewriteRule ^([a-zA-Z][a-zA-Z0-9]*)$ index.p         


        
4条回答
  •  醉梦人生
    2021-01-08 00:29

    If you want to include css/js files while using url-rewriting use that tag to specify the main url.

    < base href="http://www.your-web-site-adress.com" >
    

    Then you may easily include your css/js files like that:

    < script src="/blabla.js" >
    

    it'll add base href as prefix.

提交回复
热议问题