.htaccess rewrite not working for WordPress in root and OJS on sub-directory?
-
I am facing a problem when removing index.php from the OJS urls in OJS 3.1.2.
I want to install my WordPress on the main domain i.e. https://www.myjournal.com and then OJS on a subdirectory i.e. https://www.myjournal.com/journal/.
Wordpress has its own .htaccess file i.e.
# BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress
Now in config.php file of OJS I enabled the restfulurls to be On and placed a new .htaccess file in the https://www.myjournal.com/journal/ directroy with following code:
<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,L] </IfModule>
By this way, the index.php in urls is removed but, the OJS journal website is now showing page not found error and url is rendered by WordPress site.
Kindly help me to resolve the issue and tell me if my code are correct? How I can disable WordPress .htaccess to include OJS urls?
Regards
Pankaj
- The topic ‘.htaccess rewrite not working for WordPress in root and OJS on sub-directory?’ is closed to new replies.