We are new to mod_rewrite and semantic URLs and despite researching Google and SO we have not been able to find a clear answer to this question.
When we use a forward slash as a seperator in our .htaccess, all of our image, css and js references in our html have to be rewritten from relative paths to absolute paths.
For example:
RewriteRule ^([A-Za-z0-9-]+)/?$ inhalt.php?ebene1=$1 [NC,L] # process ebene1
RewriteRule ^([A-Za-z0-9-]+)\/([A-Za-z0-9-]+)/?$ inhalt.php?ebene1=$1&ebene2=$2 [NC,L] # process ebene1,2
RewriteRule ^([A-Za-z0-9-]+)\/([A-Za-z0-9-]+)\/([A-Za-z0-9-]+)/?$ inhalt.php?ebene1=$1&ebene2=$2&ebene3=$3 [NC,L] # process ebene1,2,3
means having to rewrite:
<link href="css/acssfile.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/ajsfile.js"></script>
<img src="imgs/animage file.gif" alt="" />
to:
<link href="http://www.oursite.com/css/acssfile.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://www.oursite.com/js/ajsfile.js"></script>
<img src="http://www.oursite.com/imgs/animage file.gif" alt="" />
Is this always a consequence of using forward slashes as seperators in semantic URLs, or is there a way to keep our relative paths?