I have Apache and I have this in the .htaccess file:
RewriteEngine on
RewriteRule ^myhome myhome.php
because I want to redirect /myhome/ to /myhome.php. It works, but it behaves unusually.
When I type in myurl.com/myhome, it redirects to myurl.com/myhome.php correctly, but when I try myurl.com/myhome/ with the slash at the end, it redirects to the page but it can't find any stylesheets or images (the paths for which are relative).
The code references "image.png" and "style.css" and without the slash at the end, it works and loads those files correctly, but with the slash, it doesn't. I think this is because it's thinking it's loading from the myhome/ directory now instead of the base directory. Could anyone tell me how to get it working right?