.htaccess configuration not working

-4

Hello, I'm trying to set up htaccess, but it's not working. The htaccess file is this

RewriteEngine On

RewriteRule ^$ /desenvolvimento/uniseries/site/
RewriteRule ^index$ /desenvolvimento/uniseries/site/index.php
RewriteRule ^livros$ /desenvolvimento/uniseries/site/livros.php
RewriteRule ^humor$ /desenvolvimento/uniseries/site/humor.php
RewriteRule ^diversos$ /desenvolvimento/uniseries/site/diversos.php
RewriteRule ^contato$ /desenvolvimento/uniseries/site/contato.php
RewriteRule ^series$ /desenvolvimento/uniseries/site/series.php
RewriteRule ^filmes$ /desenvolvimento/uniseries/site/filmes.php
RewriteRule ^entrevistas$ /desenvolvimento/uniseries/site/entrevistas.php

Is something missing to set up? Remember that I use several folders, this would be the site, the admin does not have, only this page, I know this works, because I hired a programmer to do it for me, except that in other projects I can not configure it. Could you help me?

    
asked by anonymous 22.11.2015 / 23:29

2 answers

0

You can do this as follows, removing the / from the beginning, if your site is not in the root, because when it is put to / at the beginning refers to the root of the site, so for example:

  

link / development / uniseries / site /

And when it is not put, it refers to the relative url by taking into account the folder where the .htaccess is located:

  

link development / uniseries / site /

.htaccess

RewriteEngine On

RewriteRule ^$ desenvolvimento/uniseries/site/
RewriteRule ^index$ desenvolvimento/uniseries/site/index.php
RewriteRule ^livros$ desenvolvimento/uniseries/site/livros.php
RewriteRule ^humor$ desenvolvimento/uniseries/site/humor.php
RewriteRule ^diversos$ desenvolvimento/uniseries/site/diversos.php
RewriteRule ^contato$ desenvolvimento/uniseries/site/contato.php
RewriteRule ^series$ desenvolvimento/uniseries/site/series.php
RewriteRule ^filmes$ desenvolvimento/uniseries/site/filmes.php
RewriteRule ^entrevistas$ desenvolvimento/uniseries/site/entrevistas.php
    
23.11.2015 / 00:22
0

There are a number of factors that should be considered, but try this to see if it will work:

RewriteEngine On
RewriteRule ^(.+)$ desenvolvimento/uniseries/site/$1.php [QSA,L]
    
23.11.2015 / 13:33