Problem with .htaccess

0

Good morning, I got a site to give a work on it.

I use easyphp and I can not open any site page on localhost (this site only)

I believe it might be the .htaccess file that redirects the links you typed. For example. When I type localhost: 8080 / fenendo / aprendoemcasa.com.br / index.php to open the page it redirects to link

Here's the part of the .htaccess file that does this

RewriteBase /
RewriteEngine on

RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]   
#
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+) [NC]
RewriteRule ^(.*) https://www.%1/$1 [R=301,NE,L]

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

I tried to disable this link exchange function by switching off RewriteEngine.

RewriteEngine off

But when you do this the following error happens:

I found where DOCROOT is being defined and the line looks like this.

define ('__DOCROOT__', '/home/fenpor/aprendoemcasa.com.br');

But this is the path that came from the backup, and honestly I have no idea how to move with .htaccess or even this DOCROOT. Can someone please help? I've been trying to view at least one page of the site for days and I can not. And I can not find a solution on the internet either. What is the correct path I should put there in the DOCROOT definition? If I put the correct path, will my problem be solved? Many thanks from now

    
asked by anonymous 06.04.2017 / 16:04

1 answer

0

Problem solved simply after all.

I changed the .htaccess file

RewriteEngine off

I went to the apache files folder, which is in the easyphp files, and opened the link file. In search for the word DocumentRoot

and I can find out the exact path to the DocumentRoot file.

In the connection file, I put the correct DocumentRoot path that was found on the link .

define ('__DOCROOT__', 'CAMINHO-CORRETO');

Solved!

    
07.04.2017 / 16:22