title: moving project to a subfolder messes my script path and url
body: <p>I am developing the website in my local server in a root folder, the problem is that when my client told me to upload the website in to their server, it is located in the subfolder. So the url has been like this. <a href="http://example.com/myproject" rel="nofollow">http://example.com/myproject</a></p>
  
  <p>The problem with that format is that all my css,js, ajax calls are messed up because when I tried to check Firebug/chrome console, I am seeing a <code>http://example.com/assets/css/main.css</code> , where in fact it should be <code>http://example.com/myproject/assets/css/main.css</code></p>
  
  <p>All my scripts are coded to be like this: 
  <code>&lt;link rel="stylesheet" href="/assets/css/main.css"&gt;</code> since that works perfectly when the project is not in a subfolder.</p>
  
  <p>My question now is that, is there a trick, maybe in the .htaccess or mod_rewrite that would allow me to tell the browser that always add a /myproject in all my script calls?</p>
  
  <p>The reason for this is that I don't want to change all my script calls and add a <code>/myproject/...</code></p>
  
  <p>This is the sample of my .htaccess:</p>
  
  <pre><code>Options +FollowSymLinks
  
  &lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteBase /
  
      &lt;Files .*&gt;
          Order Deny,Allow
          Deny From All
      &lt;/Files&gt;
  
      # Allow asset folders through
      RewriteRule ^(fuel/modules/(.+)?/assets/(.+)) - [L]
  
      # Protect application and system files from being viewed
      RewriteRule ^(fuel/install/.+|fuel/crons/.+|fuel/data_backup/.+|fuel/codeigniter/.+|fuel/modules/.+|fuel/application/.+) - [F,L]
  
  
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
  
      RewriteRule .* index.php/$0 [L]
  
      # Prevents access to dot files (.git, .htaccess) - security.
      RewriteCond %{SCRIPT_FILENAME} -d
      RewriteCond %{SCRIPT_FILENAME} -f
      RewriteRule "(^|/)\." - [F]
  
  &lt;/IfModule&gt;
  Options -Indexes
  </code></pre>
  
  <p>Your help will be greatly appreciated! Thanks!</p>