Install Path: /intranet
.htaccess in /intranet: RewriteBase /intranet
$base_url: http:///intranet
Clean URLs: Enabled
Everything works fine 'except' when I want to put a URL in a page without hardcoding 'intranet'.
I can make a URL relative to the current page. Let's say I'm on a page with the path 'group/sub/mypage'. I can go to a page called 'group/sub/mypage/subpage' by doing a relative link like:
'mypage/subpage'
in the body of 'group/sub/mypage'.
However, what if I want to put a reference to 'group2/sub2/anotherpage' in 'group/sub/mypage'?
As soon as I start a reference with a preceding slash in the body of a page, it doesn't seem to 'honor' the $base_url or the RewriteBase. If I put 'group2/sub2/anotherpage' in 'group/sub/mypage', I get:
group/sub/group2/sub2/anotherpage
...which is obviously wrong, but I understand why it's doing it, and sometimes it's powerful, allowing me to specify paths in page links relative to the page I'm on. However, if I do this '/group2/sub2/anotherpage', with a preceding slash, in a link in the 'group/sub/mypage' page, I get this:
http:///group2/sub2/anotherpage
It just decides to magically drop 'intranet', which is bad. The base of my site is http:///intranet. It would seem to me that any link I'd put in a page in the site should honor that base for any url that begins with the preceding slash, no?
Comments
Same issue
I'm having this issue too. What's the correct setup?