You are viewing the PKP Support Forum | PKP Home Wiki

how to redirect my journal?

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

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

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.

how to redirect my journal?

Postby dsanchez » Wed Nov 22, 2006 10:01 am

Hello everybody,

I have installed OJS in an address like this:


I have also created a "myjournal", which OJS address would be


But I'd love to create a redirect


that would show the content as if I was in:


How can I make this possible?


Posts: 30
Joined: Thu Feb 09, 2006 3:42 pm

Postby asmecher » Wed Nov 22, 2006 10:56 am

Hi David,

You can accomplish this with a combination of Apache rewrite rules (mod_rewrite) and OJS configuration.

The rewrite rules will take incoming requests for the URL you want and map it to the URL OJS expects.

Then, when generating a response, OJS needs to be properly configured so that any URLs it generates are also of the form you want to use. You can configure this with the base_url directives in config.inc.php. Note that you'll probably need to enter a few base_url options to get this working. Once you get mod_rewrite configured, feel free to ask me for help with this.

I don't have any specific experience with Apache rewriting rules, but there is a lot of documentation and many examples online, and the rule you want to write should be fairly straight-forward. If you do manage to find a good rule, please post it here so that other users can use it as a reference.

FYI, you may be able to use mod_alias instead of mod_rewrite when configuring Apache; this is easier to configure but I can't guarantee it'll be able to mask the index.php part of the URL.

Alec Smecher
Open Journal Systems Team
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Postby smitech » Tue Dec 19, 2006 6:34 pm

Just setting up a site on a shared host and needed to do the same thing ...

You can also hack this using html meta refresh. Look at your journal home page in your browser and copy the contents of the address bar. Add a directory named the name of the journal under the ojs directory. In it, put a file named index.html that contains this:

Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<meta http-equiv="REFRESH" content="0;url=PastedFromAddressBar">

where PastedFromAddressBar is changed to what you copied from the address bar and YourJournalTitleGoesHere is changed to the title of your journal.

Posts: 22
Joined: Tue Dec 19, 2006 6:15 pm

Postby smitech » Wed Dec 20, 2006 2:21 pm

I'd be remise if I didn't point out that this hack can cause some search engine spidering mayhem. Last time I checked (and for practical purposes this was a while ago - anyone that has more recent experience may want to comment) Google would index the metadata on this empty page only, so what should be your journal home page wouldn't get much attention. The Google spider will get to the real content of your journal home page, but there could be some confusion in the indexes and the Google listings. On our site we prohibit spidering of these journal directories in robots.txt so Google only accesses the "real" home page of the journal.

Posts: 22
Joined: Tue Dec 19, 2006 6:15 pm

Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests