[opencms-dev] relative links in online dynamic mode

Germonprez Dries Dries.Germonprez at cronos.be
Fri Apr 2 10:39:01 CEST 2004


You're referring to this line from the opencms.properties file;

# When set to true the links in the static export that refer to pages in the static export
# will be relative instead of absolute. Enable this feature only if you use the standard
# ruleset.
#
relativelinks_in_export=false

But that does the trick for links that are exported
I'd like to have relative links without using the export

I have 2 sites hosted on the same opencms: site1 and site2
the urls are www.myonesite.com and www.myothersite.com (not really offcourse)
www.myonesite.com refers to an apache which proxies http://127.0.0.1:8080/opencms/opencms/site1
the second url refers to http://127.0.0.1:8080/opencms/opencms/site2

so these 2 sites are actually just subdirectories of the same opencms webapp

Now if there are links on the homepage to other pages or images or css or... these links are generated as
/opencms/opencms/site1/dir1/mypage.html
==> absolute links
when clicked, these result in a request to http://www.myonesite.com/opencms/opencms/site1/dir1/mypage.html
apache sends this request to opencms as
http://127.0.0.1:8080/opencms/opencms/site1/opencms/opencms/site1/dir1/mypage.html
which does not work naturally

One way would be to use mod_rewrite, but then /opencms/opencms/site1 would be visible the url, which I do not want. I don't mind the opencms/opencms so much, I could get rid of that, I know. But it's the "site1" part that I don't want to show.
So; I'd really like <cms:link> to generate relative links for me :)

Does anybody have a suggestion?


Dries

-----Original Message-----
From: Joachim Arrasz [mailto:info at arrasz.de] 
Sent: donderdag, april 01, 2004 18:14
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] relative links in online dynamic mode


Hi,

> I'd like to make opencms generate relative links in stead of absolute 
> ones like /opencms/opencms/index.html There's a setting to change this 
> for the static export, but I don't want to do a static export.
>
> Is there any way to force relative links in opencms?

i think i found something in opencms.properties ...

but actually i can`t remember the exact position!

Bye Achim


-- 
Questions about OpenCMS?
--> www.opencms-forum.de



_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list