Today marks my first time posting a query in this forum.
I'm currently facing an issue with mod_rewrite.
Below is the structure of my filesystem:
site_new/stylesheets/layout.css
site_new/javascript/somescript.js
site_new/hallendetails.php
site_new/etc...
I attempted to redirect my PHP page to an HTML file using mod_rewrite.
The redirection is successful, and my .htaccess file looks like this:
RewriteEngine on
RewriteBase /site_new/
RewriteRule ^(.*)/(.*).html$ hallendetails.php?id=$1&halle=$2 [L]
The original URL is:
localhost/site_new/hallendetails.php?id=01&halle=Heimspielhalle_Gaissacher_Strasse
The "new" URL is:
localhost/site_new/01/Heimspielhalle_Gaissacher_Strasse.html
However, all my CSS, JS, and Image files are now broken.
They are being accessed in the following manner:
type="text/css" href="stylesheets/layout.css"
But after the redirection, they are being sought in
/site_new/01/stylesheets/layout.css
I believe I require a RewriteCond, but I'm unsure of how to implement it. I have attempted multiple approaches, but none have been successful.
I would greatly appreciate any assistance!