I am using OJS and I have installed it inside a folder called "journals". I have created some journals there (for example "journal1", "journal2", etc).
Now I am getting paths like this: www.example.com/journals/index.php/journal1
,
www.example.com/journals/index.php/journal2
, etc.
What I want is to map www.example.com/journals/index.php/journal1
to looks like www.example.com/index.php/journal1
(removing the journal part from URL).
I can't move OJS to root because I have some other files there.
Here is the .htaccess
file which I am using currently (it's in "journals" folder and giving me a 500)
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^journals
RewriteRule ^(.*) /journals/$1 [L]
</IfModule>
Also Here is the error.log
[Fri Oct 12 22:16:45 2012] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
When you put those rules inside the htaccess file in your /journals
directory, it's causing a rewrite loop. $1
never starts with journals because you're inside the journals directory, thus the rule keeps getting applied.
You'll need to put something like this in your htaccess file in your site-root, the /
directory:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/journals
RewriteRule ^index\.php(.*)$ /journals/index.php$1 [L]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With