开发者

rewritebase not working

I am using the rewrite url , And its working fine ,

But if do url rewriting then my CSS and JS not working bcoz i am call my script / css somthing like href='css/style.css' ,

I tried direct url instead of siteurl , Then css working ,

i finally desired ed to use rewritebase but for m开发者_JAVA技巧e its not working , if put this snippet then totally url rewiring not working,

    RewriteEngine On
    RewriteBase /~myfolder/
    RewriteRule ^booking/([0-9]+)/([0-9]+)/?$ home.php?price=$1&pass=$2

May i know ,

How to declare the RewriteBase in .HTACCESS FILE

Thanks


add

   RewriteCond !\.(js|css)$

To your htaccess (after rewritebase) and it should work, also feel free to add image types to this expression.

I don't know what your application does, but I'm wondering why you would make price a variable that can be injected via the url. If this is part of a webshop or something, than passing along a price this way is a very very bad idea.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜