| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
|Accredited PayPal World Seller|
|CSS not loading with htaccess rewrite rule|
| 9:56 am on Dec 23, 2011 (gmt 0)|
Im using the rewriterule in htaccess for seo friendly url
the url re-writing is working and page is getting displayed..but problem is its not loading the css and images...
RewriteRule ^books/(.*)/product-([0-9]+)\.html$ productpage.php?name=$1&&productid=$2
Can you please check out what am missing in above code
Awaiting for your replys
| 10:22 am on Dec 23, 2011 (gmt 0)|
:: peering into crystal ball ::
You have used relative links for your CSS and images. The rewrite means that these extra files are not where the browser thinks they are.
Solution: Use site-absolute links (the kind with a leading / slash) in all files that are to be rewritten.
g1 will be along presently to say: use site-absolute links all the time, everywhere
Oh, and do something about that (.*) in the middle of the pattern. It's slowing down your server. You probably mean \w+ or [^/]+.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved