I’m using the following lines of code in my .htaccess file to create redirects. The problem is, whenever I go to example.com/register/ it cant find the css files because it’s looking for example.com/register/mycss.css instead of example.com/mycss.css.
Redirect 301 register.php http://example.com/register
RewriteRule ^register/?$ register.php
How can I correct this? I’m new to any kind of htaccess/mod_rewrite functions so feel free to point me in the right direction if there are any other flaws.
In your HTML, use absolute paths to all external resources, like:
Notice the initial slash.