Absolute to relative web address

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 14
Joined: Sun Oct 03, 2010 4:36 am

Absolute to relative web address

Postby bronskyblu » Sun Oct 03, 2010 8:17 am


each link on my site, built by OCS, has all absolute addresses (i.e. "http://www.mysite.org/myconference/mypage.php") and this make me some problems cause I've an alternative domain that redirects to the first one (by proxy). I would like that all traffic come from the second domain continued to pass trough this one, back and forth reaching the main one (so users continue to read, in the address bar, "http://www.alternativedomain.com/myconference/mypage.php"). Now users that reach the conference site by the second domain are redirect completely to the main one, due to links.
I hope that it's possible to make the changes because part of the conference visibility depends from this point (not all countries reach the first domain!).

This lead me to a second question: can i make changes, also in config.inc.php file, without lost all the conference content, like added users, abstracts, etc.? Conference site is working properly already!



Posts: 4191
Joined: Tue Feb 14, 2006 10:50 am

Re: Absolute to relative web address

Postby jmacgreg » Tue Oct 05, 2010 2:56 pm

Hi Gabriele,

It sounds like for your first issue you will want to look into some URL rewriting. We don't support this directly -- it's a server issue, not an OCS one -- but you can search on the forum and elsewhere for advice, using keywords such as mod_rewrite and URL rewrite.

Regarding your second issue: Yes, you can modify your config.inc.php and you won't necessarily lose any content. What are you trying to do in this case?


Posts: 14
Joined: Sun Oct 03, 2010 4:36 am

Re: Absolute to relative web address

Postby bronskyblu » Wed Oct 06, 2010 4:09 pm

Hi James,

yes, it's true. At the end I found the solution through Apache (on the second server), rewriting each url appearing on all php page links. I would have liked to changes just an option in the config file (maybe one of the 'base_url{}') as easier way, because I did not experienced this issue in other php websites, buy I don't think this lead me to something useful.
Anyway now it works, even if this is not the best way, don't you? :)

Php pages are build by smarty templates, so i though also, as second chance, to lay hands on these files, but really I should say to don't know what I'm to do, so... what else?
Thanks and, of course, any other suggestion is welcome.


Return to “OCS Technical Support”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest