我创建了一个.htaccess
文件,并为其添加了一些重写规则,但它没有按预期工作
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^home?$ index.php
RewriteRule ^live/(.+)$ user_stream_view.php?id=$1
第一条规则正常。第二个也是渲染它没有给出任何404错误,而是所有的css和内容搞砸了
答案 0 :(得分:0)
Your problem with stylesheets has no matter with url-rewriting. You should write urls to stylesheets in your template from slash like that:
/styles/main.css
Now I think, you use styles/main.css
, and browser tries to load it from /freefootball(sohail)/live/
.
Try this rewrite to check:
RewriteRule ^/freefootball(sohail)/live/(.+)$ user_stream_view.php?id=$1