0
I am facing the following problem with the combination of more than one .htaccess in my project.
I have the following structure
siteprincipal.com.br (não é WordPress)
and inside a domain with another site in Wordpress
site2.siteprincipal.com.br
site2 is inside a directory on public_html, where the main website runs
have two .htaccess in the following structure
public_html (siteprincipal)
|--.htaccess
|--site2 (wordpress)
|--.htaccess
when I make a redirect of a url of siteprincipal to the site2, as an example
Redirect 301 /paginainterna/ http://site2.siteprincipal.com.br/paginainterna
the final result is
http://site2.siteprincipal.com.br/paginainterna////////////////
which results in an incorrect redirect.
the content .htaccess of siteprincipal is
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
Redirect 301 /paginainterna/ http://site2.siteprincipal.com.br/paginainterna
#redirect sempre para www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule .* index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
and the .htaccess of site2 is the standard of Wordpress
# BEGIN WordPress
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
how I can prevent this lot of "/" from being included, or what I’m doing wrong?