OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



mod_rewrite in OCS 2

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
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

mod_rewrite in OCS 2

Postby anna_marini » Mon Oct 06, 2008 5:05 am

Hi all,
while tweaking settings for a conference through OCS 2.1.0.1, we noticed a redundancy of index.php files in various URLs of the site (e.g. on the 'home' entry in the breadcrumb link).
We know we can remove the first index.php through mod-rewrite. Is there a way to simplify other URLs too?

Thanks
Anna
anna_marini
 
Posts: 42
Joined: Mon Mar 19, 2007 3:06 am

Re: mod_rewrite in OCS 2

Postby mcrider » Mon Oct 06, 2008 2:21 pm

Hi Anna,

I'm not sure I follow--There should be only one index.php file, and if you configured your config.inc.php and .htaccess files correctly, it should stay hidden. Is the problem that you are seeing index.php file show up in the link in various parts of the system? This shouldn't happen if you set your base_url correctly in the config.inc.php file. Please see this thread: http://pkp.sfu.ca/support/forum/viewtopic.php?f=2&t=2616, and let us know what exactly your problems are if you can't figure it out.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: mod_rewrite in OCS 2

Postby anna_marini » Tue Oct 07, 2008 7:54 am

Hi Matt,

thanks for confirming that mod_rewrite can be used for a specific conference edition as well as for a specific journal in OJS.
An example of the 'index' repetition issue affecting URLs can be found in the horizontal menu, where you can find the following link to 'home': http://my.conferences/index.php/index/index
In the breadcrumb trails, instead, the 'home' link looks like this: http://my.conferences/index.php/index/index/index

Thanks
Anna
anna_marini
 
Posts: 42
Joined: Mon Mar 19, 2007 3:06 am

Re: mod_rewrite in OCS 2

Postby mcrider » Tue Oct 07, 2008 6:48 pm

Hi Anna,

Ah, I see--the two links to the conference site page are different. Well, without doing some investigation, i'm not sure why that is. In fact, the number of '/index/'s after 'index.php' in the url is irrelevant--They all lead to the conference index page. This is likely due to template weirdness, and to fix this, one would have to edit the templates for OCS. As the URLs all work as designed (though are a little redundant), i'm not sure this be addressed anytime soon.

Kind regards,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: mod_rewrite in OCS 2

Postby asmecher » Tue Oct 07, 2008 8:50 pm

Hi all,

There are a few places that "index" might show up in the URL, and all have different meanings. For example, a typical URL might be:
Code: Select all
http://www.some-conference-website.com/index.php/index/index/about
The first index (the index.php part) is the main OCS wrapper script and you'll always see it (unless you manage to hide it using mod_rewrite). This refers to the main index.php script that's part of your OCS installation.

The second and third "index" refer to the conference and scheduled conference being viewed. You'll either see a particular conference and scheduled conference referred to by a short name (which you designate in the "path" field of the conference and scheduled conference "edit" pages), or you'll see "index", which means that we're not talking about any particular conference or scheduled conference.

FYI, there's more information on how to interpret OCS and OJS URLs in their respective Technical References, available from the Documentation section of each product's web page.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm

Re: mod_rewrite in OCS 2

Postby mcrider » Tue Oct 07, 2008 11:36 pm

Hi all,

I think the confusion lies in the fact that in the 'home' link of the breadcrumb (for example), there is a fourth 'index', which doesn't seem necessary. But that's definitely a helpful rundown of how OxS URLs work!

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: mod_rewrite in OCS 2

Postby asmecher » Wed Oct 08, 2008 10:28 am

Hi Matt,

I thought I could get away without mentioning the fourth (and fifth) potential "index" parts. These refer to the page handler class (in the case of "index", it's pages/index/IndexHandler.inc.php) and the function in it that is called. When those parts of the URL are missing, the "index" is implicit (i.e. OCS will assume it's "index" if nothing is specified).

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest