Página 1 de 2

Ainda URL amigável

Enviado: 14 Jan 2017, 16:54
por dbrazoli
Boa tarde.
Sei que o assunto já foi extensamente comentado, mas estou com uma dificuldade ainda.
Uso a versão. 2.0.1.1.
Configurei a utilização da URL amigável, instalei a extensão url-amigavel-automatica-master (embora tenha dado erro pelo instalador, subi a pasta diretamente).
Alterei o htaccess.
Editei um produto e informei a url.
Quando acessei a loja, apareceu lá a url amigável, mas se eu clicar no produto me aparece o erro abaixo:

Internal Server Error
"The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at postmaster@belezasc.com.br to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log. "

A url no navegador está assim: http://www.belezasc.com.br/BATOM-MEGA-MATTE-LIQ-FENZZA-[/color]MA73%20-%20nude?search=batom

Conversei com o provedor e me disseram que poderia haver outros arquivos htaccess. Isto é possivel ?
Há alguma outra configuração que deixei passar ?
Outra coisa, sobre a extensão instalada, no site informe que as url serão geradas automaticamente. Isso é só numa inclusão ?? Como fazer para alterar todos os produtos já cadastrados ??
Grato.
Daniel.

Re: Ainda URL amigável

Enviado: 14 Jan 2017, 17:21
por Manoel Vidal
Olá @dbrazoli.

Cole aqui o código do seu arquivo .htaccess

E sobre a modificação, ela só funciona nos produtos, quando estes são cadastrados ou editados. :)

Re: Ainda URL amigável

Enviado: 16 Jan 2017, 08:45
por dbrazoli
Olá, Manoel. Obrigado pelo retorno.
Segue o código do htaccess, conforme solicitado.
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 "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
 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 /ironcart/
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/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: Ainda URL amigável

Enviado: 16 Jan 2017, 10:01
por Manoel Vidal
Sua loja está dentro de uma pasta chamada ironcart ?

Se não estiver, no arquivo .htaccess, altere a linha abaixo:
Código: Selecionar todos
RewriteBase /ironcart/
Para:
Código: Selecionar todos
RewriteBase /
Espero ter ajudado. :)

Re: Ainda URL amigável

Enviado: 16 Jan 2017, 10:15
por dbrazoli
Manoel, a loja está sim, na pasta /ironcart/. Como disse, no navegador aparece a descrição da url amigável, e filtra o produto, mas se clicar no produto novamente, aparece o erro que mostrei anteriormente.
Teria alguma outra configuração ??

Re: Ainda URL amigável

Enviado: 16 Jan 2017, 10:51
por Manoel Vidal
Tem algo de errado, pois ela está dentro da pasta, mas a URL é:
http://www.belezasc.com.br/
E não:
http://www.belezasc.com.br/ironcart/

Você chegou a fazer a alteração que sugeri? E depois habilitar as URLs amigáveis do OpenCart?

Re: Ainda URL amigável

Enviado: 16 Jan 2017, 12:57
por dbrazoli
Manoel, pois bem, esta configuração foi orientada pelo meu provedor. Quando falei sobre o erro, me disseram para ver se não havia outros arquivos htaccess em outras pastas.
Achei estranho, pois creio que deva existir somente um, confirma ?
Sobre o caminho da pasta, o http://www.belezasc.com.br/ironcart/ responde quando é digitado www.belezasc.com.br.

Re: Ainda URL amigável

Enviado: 16 Jan 2017, 15:08
por Manoel Vidal
É para existir somente um, mas pode haver mais de um, dependendo do seu provedor ou de algo que você tenha instalado, seja do OpenCart ou de outra plataforma.

Solicito que faça o teste com a modificação que indiquei.

Re: Ainda URL amigável

Enviado: 16 Jan 2017, 15:15
por dbrazoli
Pois é, acabei tirando a sub pasta /ironcart/ e deixando somente /.
À princípio funcionou.
Vou testar mais e depois te retorno.
Sobre a geração automática da string url automática, vc diz que só funciona na inclusão de uma nova ou editando, correto ?
Editando o nome e salvando funciona ? Pois eu tentei isso e não deu certo.
Vou tentar novamente.
Grato, por enquanto.

Re: Ainda URL amigável

Enviado: 16 Jan 2017, 19:21
por Manoel Vidal
Que bom que funcionou. :)

Sobre a URL amigável automática, ela gera a URL baseada no idioma padrão da loja, ou seja, ao cadastrar o título ou modificá-lo depois de cadastrado, neste caso, se você não for utilizar o inglês na loja, remova o idioma inglês, e depois atualize o cache de modificações que deve funcionar. :)