title: CSS and JS not loading with mod_rewrite
body: <p>I am using apache's mod_rewrite module to improve my URL structure(for one instance- <code>www.mydomainname.com/user.php?u=somename</code>) to some fancy URL like <code>www.mydomainname.com/user/somename</code> . I have successfully achieved it until I got into this very bad situation of CSS and JS relative path issue. 
  Whenever I open up <code>www.mydomainname.com/user/somename</code>, it loads successfully without CSS and JS with only text and basic HTML. I used chrome's "inspect element" feature, which help me to know the following errors that occurred.</p>
  
  <pre><code>GET http://www.mydomainname.com/user/css/style.css 404 (Not Found) somename:5
  GET http://www.mydomainname.com/user/css/developer.css 404 (Not Found) somename:6
  GET http://www.mydomainname.com/user/js/jquery-1.5.2.js 404 (Not Found) somename:7
  GET http://www.mydomainname.com/user/js/jquery.form.js 404 (Not Found) somename:5
  </code></pre>
  
  <p>The .htaccess file has following contents-</p>
  
  <pre><code>DirectoryIndex index.html.php
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule    ^user/([^/.]+)/?$    user.php?u=$1    [L]
  </code></pre>
  
  <p>The user.php is residing in the parent folder as well as the CSS and JS folders. I got to know the cause but do not know how to remove the errors.</p>
  
  <p><strong>EDIT</strong>: The path of CSS and JS given in the user.php file are-</p>
  
  <pre><code>&lt;link type = "text/css" rel = "stylesheet" href = "css/style.css"&gt;
  &lt;link type = "text/css" rel = "stylesheet" href = "css/developer.css"&gt;
  &lt;script type="text/javascript" src="js/jquery-1.5.2.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/jquery.form.js"&gt;&lt;/script&gt;
  </code></pre>