html - change document root in all links of a website -


i have website made cakephp. of links in it, , asset paths, absolute (start "/").

we're having problems our hosting provider , domains messed up, including 1 website. i've managed access through domain, website instead of being on document root of domain (as original domain), inside few folders (so mydomain.com/folder1/folder2/folder3/my_index.php).

is there easy way can make links/paths start "/" point folder want (for example mydomain.com/folder1/folder2/folder3/) instead of happens now? (they point mydomain.com)

yes, want <base> html tag. use such:

<head>     <base href="http://mydomain.com/folder1/folder2/folder3/"> </head> 

you can make links open in new window adding target="_blank" attribute base tag.

mdn reference: https://developer.mozilla.org/en-us/docs/web/html/element/base


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -