Rewriting URL to subdomain

Dear friends,

I have installed OJS 2.4.7-1 to and hosting a “journal1”.
I turned on the Restful URL in config.file and added following code to .htaccess.

<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,L] </IfModule>

It seems that Restful URLs works fine. Thus my journal1’s URL became I am glad that there is no any "index.php"s in URL.

Now, I want to set my base ojs URL to a subdomain as And I want to transform my journal1’s URL into

How to do it? Any idea?

1 Like

To do this, your subdomain’s document root should point to the “ojs” folder itself.

To move the URL from the www to the new ojs subdomain, just move the files from the “ojs” directory to the subdomain’s document root.

If you want to keep both URLs ( and you might try a symbolic link in a Linux environment. Beware however that this might not work out-of-the box with OJS’s built-in caching.

1 Like

Hi @ctgraham,

Thanks for your answer. I already have created the subdomain, and pointed it to the ojs directory. But does not work for me. Still my journal appears on

The little I can see of your setup looks ok.

What error do you get when you try to access the ojs subdomain?

@ctgraham, I do not get any errors, when I type it was redirecting to But today I SOLVED the issue. I recognize that it happens due to preserved browser (chrome) cache. When I cleared browser cache, the has started to work.

1 Like