I explain:
My website without friendly URL is like this
link
and my images and js work perfect
src="img / image1.png"
src="js / script.js"
The error comes when I have friendly URLs
link
Because the DOM takes me the routes of the images and js asi:
link link
Obviously gives the error.
and I know how to solve it by putting the URL of the web. or putting ../../
But the thing is not there I'm tired of being the same in every project.
SO I LOVE THE SOLUTION WITH PURE HTACCESS. Can someone help me?
PS: I want it to be relatively achievable, since this script is installed in several domains and I do not want to be configuring URLs for each different domain.
This is the code that I have in my htaccess
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
# idiomas web.com/es/ web.com/en/ web.com/br/
RewriteRule ^([a-zA-Z]{2})/?$ index.php?lang=$1