html - Rewrite rule break css on third level links -
i have trying make pretty url's .htaccess
. structure of pages this- http://example.com/category_id=1/item_id=1
:
index index->category index->category->single_item_from_category
i've trying make like-http://example.com/category-1/item-1.html
css on third level /item-1.html
isn't there. page doesn't have css @ all. must site in sub folder of main sait: http://example/site-is-here/
.htaccess code
rewriterule ^vcat-([^/]*)/video-([^/]*)\.html$ /second/video_category.php?video_cat_id=$1&video_id=$2 [l]
and link in php/html part
<a href="/vcat-'.$video_cat_id.'/video-'.$row['video_id'].'.html">'.$row['video_title'].'</a>
on other pages 'pretty url's' working. problem whit pages index.php/category/item
when go on page seems miss css fail , check in source of page link css is: http://example.com/sait/vcat/css/main.css
should http://example.com/sait/css/main.css
just add base href
in <head></head>
section this:
<base href="http://www.example.com/sub-folder/" />
it should work.
Comments
Post a Comment