Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

jerfeson

.htaccess - Codeigniter

Recommended Posts

Então pessoal, já não sei mais o que fazer...

Desenvolvi uma aplicação em codeigniter, aqui no meu computador e no ambiente de teste funcionou perfeitametne sem enm um problema, entretanto quando fui instalar no servidor do cliente quando tento abrir o link um subpasta no site do cliente ao invés dele me direionar para pasta de login... ele me direiona a página principal do site o que acontece é que o cliente já tem um site em wordpress e quer colocar o sistema no mesmo ambiente... www.siteempresa.com.br/sistemas.. o curioso é que ao acessar o link mesmo carregando a página principal na URL apresenta www.siteempresa.com.br/sistemas/login... o meu arquivo .htaccess

 <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.

    ErrorDocument 404 /index.php
</IfModule>  

Compartilhar este post


Link para o post
Compartilhar em outros sites

Esse htacess é de onde? Do diretorio da sua página ou da página que já existia?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Esse htacess é de onde? Do diretorio da sua página ou da página que já existia?

 

Esta no diretório do sistema... direitorio raiz a estrutura é essa Sem_t%C3%ADtulo.png?1399077961

Compartilhar este post


Link para o post
Compartilhar em outros sites

Quando você coloca no começo do caminho "/" ele está apontando para o diretório raiz do síte e não da pasta sistemas, você pode tirar ele do RewriteBase e nos outros lugares, até ficar assim:

 

 

<IfModule mod_rewrite.c>
RewriteEngine On

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ index.php?/$1 [L]

#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ index.php?/$1 [L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.

ErrorDocument 404 index.php
</IfModule>

Compartilhar este post


Link para o post
Compartilhar em outros sites

 

Quando você coloca no começo do caminho "/" ele está apontando para o diretório raiz do síte e não da pasta sistemas, você pode tirar ele do RewriteBase e nos outros lugares, até ficar assim:

<IfModule mod_rewrite.c>
RewriteEngine On

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ index.php?/$1 [L]

#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ index.php?/$1 [L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.

ErrorDocument 404 index.php
</IfModule>

Mesmo assim não funionou :(

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.