Página 1 de 2
URL amigavel 1.5.6.4
Enviado: 31 Jul 2014, 23:21
por renanalmeida
Ola amigos procurei muito aqui no fórum, segui o tutorial mas o arquivo .hatcess simplesmente some e desaparece na minha instalação acho que por isso não consigo habilitar URL amigaveis. Alguem ja passou por isso?
Re: URL amigavel 1.5.6.4
Enviado: 01 Ago 2014, 10:35
por Manoel Vidal
Olá,
Geralmente o que acontece é que programas de ftp e gerenciadores de arquivo ocultam o arquivo .htaccess, o que você tem que fazer é descobrir como desocultar todos os arquivos, assim você conseguirá enxergar o arquivo, algo muito importante é que esse arquivo só funciona em servidores com apache, se não for apache não vai funcionar.
Segue o link de um artigo que também pode ajudar:
https://www.opencartbrasil.com.br/tutori ... -amigaveis
Espero ter ajudado.

Re: URL amigavel 1.5.6.4
Enviado: 02 Ago 2014, 21:58
por renanalmeida
Obrigado Manoel, mas como faço isso?
Re: URL amigavel 1.5.6.4
Enviado: 03 Ago 2014, 13:02
por Manoel Vidal
Não há uma receita de bolo para isso, ou seja, não é um procedimento genérico que serve para todos os casos, você vai ter que ver no gerenciador de arquivo de sua hospedagem ou mesmo no programa de ftp que você estiver utilizando (caso esteja utilizando um).
Dê uma boa pesquisada no google, relacionando a pesquisa a sua hospedagem ou ao programa ftp que você estiver utilizando.
Só lembrando que o arquivo .htaccess não é um tipo de arquivo exclusivo do OpenCart, ele é utilizado em todos os sistemas que queiram gerenciar url amigáveis, de lojas como o OpenCart, CMS como o Joomla, a blogs como o Wordpress.
Espero ter ajudado.

Re: URL amigavel 1.5.6.4
Enviado: 03 Ago 2014, 21:28
por renanalmeida
Obrigado Manoel vou dar uma boa olhada.. Abraço
Re: URL amigavel 1.5.6.4
Enviado: 28 Ago 2014, 12:29
por rafaelschwed
Pessoal.. eu devo estar ficando louco.. mas baixei a versão 1.5.6.4 e não vem htaccess dentro... Digo mesmo antes de mandar pra ftp...
tb não consigo habilitar as urls amigáveis... =/
Re: URL amigavel 1.5.6.4
Enviado: 28 Ago 2014, 13:37
por Manoel Vidal
@rafaelschwed Você pode criar o arquivo .htaccess, segue o conteúdo do arquivo:
Código: Selecionar todos# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.
# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off
# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off
# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M
# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M
# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200
# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200
# 7. disable open_basedir limitations
# php_admin_value open_basedir none
Re: URL amigavel 1.5.6.4
Enviado: 28 Ago 2014, 14:22
por rafaelschwed
Eu habilitei mas deu o "Internal Server Error 500"... pelo jeito o servidor da minha hospedagem não aceita. O pior é que é o hostgator.. um monte de gente aqui usa...
Re: URL amigavel 1.5.6.4
Enviado: 28 Ago 2014, 16:22
por Manoel Vidal
Entre em contato com o suporte e verifique se realmente não aceita, pois até onde sei a Hostgator não tem restrições a arquivo .htaccess
Espero ter ajudado.

Re: URL amigavel 1.5.6.4
Enviado: 08 Set 2014, 16:44
por rafaelschwed
Eu copiei o .htaccess de outra loja e funcionou... obg