geek
January 16, 2018, 12:08pm
1
como puedo hacer para que las demás revistas puedan quedar con subdominios y aparte no se les vea el index así como sale en este ojs https://revistas.uchile.cl/ ???
probé con este metodo →
You will want to create an .htaccess file in the root folder of OJS to handle the “restful urls” as configured in config.inc.php.
For example:
and
Routing different domains and subdomains to OJS will need to be handled outside of the .htaccess file. This is done in the Apache config or within your web host’s cPanel (or similar).
pero no resulto. y mi propósito es que quede casi igual que el ojs antes mencionado.
Can you describe exactly what you have tried, and described what is currently happening?
geek
January 16, 2018, 2:31pm
3
I have used
restful_urls = On
base_url [index] = http://nombre.dominio.cl
base_url [name2] = http://nombre2.dominio.cl
.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond% {HTTP_HOST} ^ name.domain.cll / $
RewriteRule ^ $ http://name.domain.cl [L, R = 301]
RewriteCond% {DOCUMENT_ROOT}% {REQUEST_URI}! -d
RewriteCond% {DOCUMENT_ROOT}% {REQUEST_URI}! -f
RewriteCond% {REQUEST_FILENAME}! -d
RewriteCond% {REQUEST_FILENAME}! -f
RewriteCond% {REQUEST_URI}! ^. * / Index.php /.*$
RewriteRule ^ (. *) $ /index.php/$1 [QSA, L]
</ IfModule>
but it does not help much unless in base_url [name2] put base_url [name2] = dominio.cl but I want the eyes to be exactly as it appears on the previously published page, apart from the fact that the magazine principal is deformed.
You can use three backticks to surround code so that it is formatted in the forum:
```
<code here />
```
In your case, you want each redirect to be conditional on the domain name, and to redirect specifically to a journal.
For example (untested):
RewriteCond% {HTTP_HOST} ^name2.domain.cl$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^.*/index.php/.*$
RewriteRule ^/(.*)$ /index.php/nombre2 [QSA,L]
In this case, name2.domain.cl maps to /index.php/nombre2
You would need a statement like this for each subdomain/journal and for the domain/site level.
geek
January 17, 2018, 8:08pm
5
solve it with this code
RewriteCond %{SERVER_NAME} ^([a-z0-9-]+)\.ucm\.cl$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/%1/$1 [L]