Can't access to admin without index.php

Originaly, I have this URL for my revue : http://journal.adress.fr/ojs/index.php/MJ

But I want to change it for : http://journal.adress.fr/MJ

That for, I created a .htaccess file like that :

  RewriteEngine On  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,L]

And make some change on config.inc.php :
Add : base_url[index] = http://journal.adress.fr/ojs
Change: restful_urls = On

(I escape the “/ojs” from URL in the virtualhost configuration)

With this configuration, everything work well except the admin access,
if I click on “administrator setting” I stay on the current page http://journal.adress.fr/ojs/user

But the URL http://journal.adress.fr/index.php/index/admin manually entered success.

(I had the same problem with manager access before added this :
base_url[index] = http://journal.adress.fr/ojs)

Has someone got an idea !

Try:

base_url[index] =  http://journal.adress.fr/index

Thank you for your help,

I tryed to replace my code : base_url[index] = “http://journal.adress.fr/ojs
by your code : base_url[index] = “http://journal.adress.fr/index
but the problem is bigger like that, i can’t access to user home by click.

What url appears as the User Home link with base_url[index] as http://journal.adress.fr/index ? What error message do you get when clicking it?

If you are using Apache 2.2 or higher, your .htaccess rewrites will need to look like:

RewriteEngine On  
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]

See http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8797#c9 and http://amandine.aupetit.info/135/apache2-mod_rewrite/ for details.

With base_url[index] = http://journal.adress.fr/index
The URL of user home link is : journal.adress.fr/index/user
but I’m redirected to default home page : http://journal.adress.fr/MJ/index

My apache version is 2.2.8 and I tested your .htaccess command line, I obtained this result :

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, www@my.enterprise.fr and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

It sounds like there are other directives in your .htaccess or Virtualhost configuration. Can you share the full config? What did you do to “escape the “/ojs” from URL in the virtualhost configuration” in your first post?

My virtualhost configuration is :

<VirtualHost XXX.XXX.XXX.XXX>
    ServerName journal.adress.fr
    ServerAdmin www@xxxx.fr
    DocumentRoot "/www/journal.adress.fr/prod/ojs/"

    <Directory "/www/journal.adress.fr/prod/ojs">
    AllowOverride FileInfo
    </Directory>

    CustomLog /www/journal.adress.fr/logs/access_log combined env=!donotlog
    ErrorLog /www/joural.adress.fr/logs/error_log

    DirectoryIndex index.html index.htm index.php index.php3
</VirtualHost>

Your configuration snippet looks sane to me.

I’d be curious to know what line was causing the Internal Server Error you mentioned earlier.

For more context on rewrites in OJS in general see my post here: