When i type myjournal.com.br it goes to myportal.com.br/index.php/myjournal, as expected, but i need it to keep the myjournal.com.br url at the browser…
IF i add the [P] flag at [R=301,NC,P], i got the right url at the browser (myjournal.com.br), but the site shows the myportal.com.br content…
Before i went nuts inside the .htaccess i tried the restful_urls way. And the OJS keep showing the unformated version of the page…
Is there a way that I can solve this problem inside the .htaccess?
Saying “i need it to keep the myjournal.com.br url at the browser” suggests that you are not wanting to redirect the browser, but rather rewrite the request.
These are two distinct operations. In the example code you provided you are redirecting the web browser with any request to myjournal.com.br, telling the browser to go to www.myportal.com.br instead.
To perform a rewrite of the request would be to have your server provide the content for one URI path via another URI path. This is want typically happens with the RESTful URLs configuration. For example, a request comes in for “/ojs/myjournal/index”, which doesn’t actually exist, so it is re-written as “/ojs/index.php/myjournal/index”, which passes parameters of “myjournal/index” to the “/ojs/index.php” script.
The most straightforward way to manage multiple domains is by using multiple virtual hosts in your Apache configuration. If you only have access to the Apache configuration via .htaccess, you will need to setup multiple re-write rules. This can be configured with or without restful URLs.
There is a fairly extensive discussion on multiple domains here:
Do be aware, however, that this will require mastery of Apache’s mod_rewrite directives and it is one of the more complex server administration topics discussed here.