5

rewrite rule changed the base path of the web app

view full story
linux-howto

http://serverfault.com – I have a simple web app and I set it up to use .htaccess for rewrite rules. Options +followSymlinks RewriteEngine on Rewriterule ^records/view/([0-9]+)$ ./record_view.php?id=$1 [NC] It works but the page doesn't see the external CSS file. Instead of looking for ./style.css, it's looking for records/view/style.css. <link rel="StyleSheet" href="style.css" type="text/css" /> It works if I use the full path to it: href="/myapp/style.css". The app was written before the rewrite rules were added, so this breaks all the links in the app too. href="index.php" has to become href="/myapp/ (HowTos)