The Joomla! Forum ™






Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: .htaccess + Joomla!
PostPosted: Mon Jan 22, 2007 5:33 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Jan 22, 2007 5:24 pm
Posts: 57
Location: Farroupilha-RS
Boa tarde a todos!

Vou direto a questão, fazem 3 dias que estou tentando ativar o SEF no Joomla!, mas toda vez que eu coloco o .htaccess ocorre um erro interno na pagina. Hoje finalmente consegui ter acesso ao relatorio de erros do apache, e o erro que ocorre é o seguinte:
Code:
[Mon Jan 22 15:05:48 2007] [alert] [client 200.228.199.2] /home/dfinfo/public_html/site/.htaccess: RewriteCond: bad flag delimiters, referer: http://www.dfinfo.com.br/site/


Alguem sabe qual é o erro?

Obrigado!


Top
 Profile  
 
 Post subject: Re: .htaccess + Joomla!
PostPosted: Mon Jan 22, 2007 8:28 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Sat Jul 15, 2006 1:41 am
Posts: 2140
Location: Porto Alegre - RS - Brazil
Antes de qualquer coisa, teste se mod_rewrite está funcionando:

##### Testar se mod_rewrite está ativo no sevidor:
##
## 1°  Vá em administrator> SEO > enable > save
## 2°  Coloque um .htaccess na raiz do sei site ***SOMENTE*** com as seguintes linhas
##
Options +FollowSymLinks
Redirect /joomla.html http://www.joomla.org
##
## 3°  Vá na página http://www.seusite.com/joomla.html, e, se foi redirecionado para 'http://www.joomla.org'
##      o mod_rewrite está ativado. Caso não esteja, as URLs amigáveis normalmente não funcionam


Diga se consegue fazer isso.


Retirado de http://forum.joomla.org/index.php/topic,124708.0.html

_________________
Emerson da Rocha Luiz
Moderador do Fórum | Membro do JUGRS | Membro do JCoderBR
http://www.fititnt.org | Twitter: @fititnt
Comente o Dojoomla que rolou do #jdbr11: http://www.fititnt.org/joomladaybrasil/ ... dbr11.html


Top
 Profile  
 
 Post subject: Re: .htaccess + Joomla!
PostPosted: Mon Jan 22, 2007 8:39 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Jan 22, 2007 5:24 pm
Posts: 57
Location: Farroupilha-RS
Já tinha lido esse topico. Coloquei só as duas linhas, olha o resultado:

Página:
Code:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@dfinfo.com.br and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Log:
Code:
[Mon Jan 22 18:35:44 2007] [alert] [client 200.228.199.2] /home/dfinfo/public_html/site/.htaccess: Options not allowed here


Top
 Profile  
 
 Post subject: Re: .htaccess + Joomla!
PostPosted: Tue Jan 23, 2007 4:41 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Sat Jul 15, 2006 1:41 am
Posts: 2140
Location: Porto Alegre - RS - Brazil
Putz. Já dá pra ver que tem problema

Ver se Rewrite está habilitado no servidor
PHP CGI: Administrador >Sistema > Info do sistema > Php Info > standard >Directive > **url_rewriter.tags** aparece habilitado?
PHP Módulo: Administrador >Sistema > Info do sistema > Php Info > apache2handler > mod_rewrite > Loaded Modules > **mod_rewrite** aparece habilitado?

O Rewrite não tá habilitado no teu servidor.  Qual o teu servidor? É um internacional, ou tem algum intermediario internacional? Talvez complique as coisas, e você vai ter problemas. Peça para eles ativarem essa diretiva, ou você terá problemas. eu pessoalmente não usaria um host que não tivesse isso, se tivesse mais opções.

Se for um gratúito, tem outros servidores gratúitos que tem ele habilitado.

Conforme eu postei no link que eu tinha passado antes vem um link que alguém tentou e conseguiu fazer, só que isso funciona se for usar o OpenSEF, e não o do core do joomla, mas acho que vale a pena se tá mesmo interessado nesse host. Se funcinar contigo, me avisa que eu to interessado nisso também.:

http://forum.j-prosolution.com/opensef- ... #post12617 :

Quote:
towmac
Junior Member
 

Wuhu! I got it!

"Create the file .htaccess and make the following the only line:
Code:

ErrorDocument 404 /index.php
"

That was it! Now openSEF works without mod_rewrite at all. Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

_________________
Emerson da Rocha Luiz
Moderador do Fórum | Membro do JUGRS | Membro do JCoderBR
http://www.fititnt.org | Twitter: @fititnt
Comente o Dojoomla que rolou do #jdbr11: http://www.fititnt.org/joomladaybrasil/ ... dbr11.html


Top
 Profile  
 
 Post subject: Re: .htaccess + Joomla!
PostPosted: Tue Jan 23, 2007 4:54 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Sat Jul 15, 2006 1:41 am
Posts: 2140
Location: Porto Alegre - RS - Brazil
P@#$%¨! UHUUU!

Eu tava a umas duas semanas tentando resolver a p#% de um problema num servidor que dava m#$% com o SEF, mas, foi SÓ adicionar

Quote:

ErrorDocument 404 /index.php  # se o site ficar em um subdiretório use /subdiretorio/inde.php



no .htacess e AGORA o OpenSEF funciona sem mod_rewrite ativado! Foi só testar pra ver se dava certo pra te ajudar e e resolvi um problema nuns dos meus joomla num servidor diferente deu! Bah, até vou soltar uns rojão de felicidade.

Qualquer coisa aprende a instalar o OpenSEF. Eu largueis uns tutoriais aqui pelo forum que explicam como usá-lo.

_________________
Emerson da Rocha Luiz
Moderador do Fórum | Membro do JUGRS | Membro do JCoderBR
http://www.fititnt.org | Twitter: @fititnt
Comente o Dojoomla que rolou do #jdbr11: http://www.fititnt.org/joomladaybrasil/ ... dbr11.html


Last edited by fititnt on Tue Jan 23, 2007 4:56 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: .htaccess + Joomla!
PostPosted: Tue Jan 23, 2007 11:48 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Jan 22, 2007 5:24 pm
Posts: 57
Location: Farroupilha-RS
Quote:
Ver se Rewrite está habilitado no servidor
PHP CGI: Administrador >Sistema > Info do sistema > Php Info > standard >Directive > **url_rewriter.tags** aparece habilitado?
PHP Módulo: Administrador >Sistema > Info do sistema > Php Info > apache2handler > mod_rewrite > Loaded Modules > **mod_rewrite** aparece habilitado?


Sim, eu utilizo módulo e esta habilitado o mod_rewrite.

Quote:
O Rewrite não tá habilitado no teu servidor.  Qual o teu servidor? É um internacional, ou tem algum intermediario internacional? Talvez complique as coisas, e você vai ter problemas. Peça para eles ativarem essa diretiva, ou você terá problemas. eu pessoalmente não usaria um host que não tivesse isso, se tivesse mais opções.

Se for um gratúito, tem outros servidores gratúitos que tem ele habilitado.


Hospedo na Locaweb, pedi pra eles modificarem as diretivas que precisavam ser mudadas, tipo ativar o magic_quotes_gpc e desabilitar o register_globals etc, e está tudo OK.

Quote:
Conforme eu postei no link que eu tinha passado antes vem um link que alguém tentou e conseguiu fazer, só que isso funciona se for usar o OpenSEF, e não o do core do joomla, mas acho que vale a pena se tá mesmo interessado nesse host. Se funcinar contigo, me avisa que eu to interessado nisso também.:

http://forum.j-prosolution.com/opensef- ... #post12617 :



Vou testar, qualquer coisa eu falo.


Top
 Profile  
 
 Post subject: Re: .htaccess + Joomla!
PostPosted: Tue Jan 23, 2007 11:52 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Sat Jul 15, 2006 1:41 am
Posts: 2140
Location: Porto Alegre - RS - Brazil
dfinfo wrote:

... pedi pra eles modificarem as diretivas que precisavam ser mudadas, tipo ativar o magic_quotes_gpc e desabilitar o register_globals etc, e está tudo OK.



Se ele vão trocar por você pedir, então está bem. Não tem muico com que se extressar.

_________________
Emerson da Rocha Luiz
Moderador do Fórum | Membro do JUGRS | Membro do JCoderBR
http://www.fititnt.org | Twitter: @fititnt
Comente o Dojoomla que rolou do #jdbr11: http://www.fititnt.org/joomladaybrasil/ ... dbr11.html


Top
 Profile  
 
 Post subject: Re: .htaccess + Joomla!
PostPosted: Tue Jan 23, 2007 12:13 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Jan 22, 2007 5:24 pm
Posts: 57
Location: Farroupilha-RS
fititnt wrote:
P@#$%¨! UHUUU!

Eu tava a umas duas semanas tentando resolver a p#% de um problema num servidor que dava m#$% com o SEF, mas, foi SÓ adicionar

Quote:

ErrorDocument 404 /index.php  # se o site ficar em um subdiretório use /subdiretorio/inde.php



no .htacess e AGORA o OpenSEF funciona sem mod_rewrite ativado! Foi só testar pra ver se dava certo pra te ajudar e e resolvi um problema nuns dos meus joomla num servidor diferente deu! Bah, até vou soltar uns rojão de felicidade.


Aeee, por isso que eu tambem gosto de ajudar os outros, agente acaba se beneficiando. :D

Quote:
Qualquer coisa aprende a instalar o OpenSEF. Eu largueis uns tutoriais aqui pelo forum que explicam como usá-lo.


Já estou usando OpenSEF, testei a opção acima e ainda não funcionou!

Erro na página:
Quote:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@dfinfo.com.br and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Erro no log:
Quote:
[Tue Jan 23 09:54:55 2007] [alert] [client 200.228.199.2] /home/dfinfo/public_html/site/.htaccess: Options not allowed here, referer: http://www.dfinfo.com.br/site/
[Tue Jan 23 09:54:55 2007] [alert] [client 200.228.199.2] /home/dfinfo/public_html/site/.htaccess: Options not allowed here, referer: http://www.dfinfo.com.br/site/
[Tue Jan 23 09:54:56 2007] [alert] [client 200.228.199.2] /home/dfinfo/public_html/site/.htaccess: Options not allowed here, referer: http://www.dfinfo.com.br/site/
[Tue Jan 23 09:54:57 2007] [alert] [client 200.228.199.2] /home/dfinfo/public_html/site/.htaccess: Options not allowed here


.htaccess
Quote:
##
# @version $Id: htaccess.txt 5973 2006-12-11 01:26:33Z robs $
# @package Joomla
# @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On


#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla!/MamboDirectory (just / for root)

RewriteBase /site

ErrorDocument 404 /site/index.php

########## Begin - Joomla! core SEF Section
############# Use this section if using ONLY Joomla! core SEF
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
#RewriteRule ^(content/|component/) index.php
#
########## End - Joomla! core SEF Section



########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section



########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group