Problem with root redirects

1

You see, I have a domain called www.cssblog.es , and a subdomain called comunidad.cssblog.es .

The fact is that when you enter comunidad.cssblog.es , you redirect me to the main page. However, if I wrote cssblog.es/comunidad/ (the address pointed to by the subdomain), if I accessed, but of course I want to access from the subdomain.

I tried to put this in the htaccess:

# Si se accede desde
RewriteCond %{HTTP_HOST} comunidad.cssblog.es
# Y la carpeta solicitada no es "comunidad"
RewriteCond %{REQUEST_URI} !comunidad/
# accedemos directamente a la carpeta mi/la_url_indicada
RewriteRule ^(.*)$ comunidad/$1 [L]

And now when writing the subdomain it does not redirect but the blank screen comes out and you can read page not found.

However, if we access by comunidad.cssblog.es/index.php it connects to the page (it is a forum in vbulletin) and from there no more errors come out.

The failure is that since comunidad.cssblog.es does not enter because it leaves page not found, and you have to add the index.php

How can I solve it completely?

    
asked by Pedro Corchero Murga 17.09.2017 в 04:10
source

1 answer

0

It seems that your problem is not with the htaccess, which should not because it is a subdomain, but with the urls configured in your forum, I do not know exactly how the forum you are using is configured but in Wordpress when you change domain, in your case you want to change from cssblog.es/comunidad to comunidad.cssblog.es you have to configure the url in the database, replace the url of the old for the new one.

And also verify that if your forum in the folder / community has a .htaccess for friendly url this well configured, if you have a htacces with the line:

RewriteBase /comunidad/

#debe quedar así 
RewriteBase /

I hope it serves you.

    
answered by 27.11.2017 в 09:51