PDA

Zobacz pełną wersję : Joomla 3.6.5 problem z logo 404



autoto
28-09-2017, 10:55
Witam,

Mam problem z logo na stronie www.autoto.eu. Po kliknięciu na logo wyrzuca mi 404. Zainstalowany mam szablon joomlage0100 - One, nie mam w nim pliku .htaccess ale też nie wiem czy konieczne żebym go miał. Co mogę zrobić ..?

Proste adresy: Tak
Zastosuj przepisywanie URL: Tak
Adresy z przyrostkiem: Nie
Aliasy w Unicode: Nie
Wielojęzyczność tj. system filtr języków: Wyłączony

Szukałem w tematach ale nie znalazłem.

Z góry dzięki za pomoc!

zwiastun
28-09-2017, 11:42
Plik .htaccess ma być w głównym katalogu. I przy takich ustawieniach, jak podałeś, MUSI być. Zmień nazwę pliku htaccess.txt na .htaccess i powinno być OK

autoto
28-09-2017, 12:21
Dzięki za szybką odpowiedź. Faktycznie źle sprawdzałem. Plik znajduje się w głównym katalogu i nazywa się poprawnie - .htaccess a wewnątrz:

:Location *.php
use php56
:Location

##
# @package Joomla
# @copyright Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##

##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of mod_rewrite, but it may have already been set by your
# server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##

## No directory listings
IndexIgnore *

## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes

## Mod_rewrite in use.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a ********** tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

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

# RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.

adam.lachut
28-09-2017, 13:04
Zależy co dla Ciebie jest problemem :)

- jeżeli link pod logo (zamiast www.autoto.eu/index.php chciałbyś żeby było www.autoto.eu), to najprawdopodobniej musisz wprowadzić drobną modyfikację do szablonu, prawdopodobnie w /templates/joomlage0100-one/index.php - spróbuj dołączyć, zobaczymy

- jeżeli chcesz żeby index.php przekierowywał do strony głównej, to musisz taką regułę dopisać do .htaccess (wygoogluj)

- jeżeli błąd 404 podczas wyświetlania /index.php (powinna siw wyświetlać strona główna) to trudno powiedzieć, może to być np. jakiś problem z menu, z artykułem wyróżnionym, ze specyficznymi ustawieniami szablonu itp.

A.

autoto
28-09-2017, 14:41
Dzięki Panowie za pomoc. Jeżeli chodzi o zmianę i dopisanie w .htaccess reguły aby index pchał do głównej, wszystkie główne zakładki menu przekierowywały do głównej. Kod jaki dodałem:


RewriteRule ^index.(php|html|htm)$ / [R=301,L]
RewriteRule ^([a-z0-9-_]+)/index.(php|html|htm)$ /$1/ [R=301,L]



Jeżeli chodzi o index.php z templates to przedstawia się następująco:


<?php

/*================================================= ===============================*\
|| # Copyright (C) 2012 Joomlage.com Nexus Framework. All Rights Reserved. ||
|| # license - PHP files are licensed under GNU/GPL V2 ||
|| # license - CSS - JS files are Copyrighted material ||
|| # Website: http://www.joomlage.com ||
\*================================================ ================================*/

defined('_JEXEC') or die;
// JPlugin::loadLanguage( 'tpl_SG1' );
JHtml::_('behavior.framework', true);
define( 'nexus', dirname(__FILE__) );
require( "php/config.php");
require( "php/variables.php");

// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');

?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<?php include ( "php/styles.php");?>
<?php echo ($head_custom_code); ?>
</head>

<body>
<div class="se-pre-con"></div>

<a href="#" class="scrollup">Scroll</a>
<div id="#spacer" class="spacer"></div>
<div id="container_header" class="jl_container"><div class="wrapper960">
<?php require( "php/layouts/header.php"); ?>
</div></div>

<div id="container_logo_menu_mobile" class="jl_container"><div class="wrapper960">
<?php require( "php/layouts/responsive_head.php"); ?>
</div></div>
<div id="#spacer" class="spacer-2"></div>

<?php if ($this->countModules( 'jumbotron' )) : ?>
<div id="container_jumbotron_bg" style="background-position: 50% 0%" data-stellar-background-ratio="0.5">
<div id="container_jumbotron" class="jl_container"><div class="wrapper960">
<?php require( "php/layouts/jumbotron.php"); ?>
</div></div></div>
<?php endif; ?>

<?php if ($this->countModules( 'showcase' )) : ?>
<div id="container_slideshow" class="jl_container"><div class="wrapper960">
<?php require( "php/layouts/slideshow.php"); ?>
</div></div>
<?php endif; ?>

<div id="content"></div>
<?php if ($this->countModules('top-1a') || $this->countModules('top-1b') || $this->countModules('top-1c') || $this->countModules('top-1d') || $this->countModules('top-1e') || $this->countModules('top-1f') || $this->countModules('top-2a') || $this->countModules('top-2b') || $this->countModules('top-2c') || $this->countModules('top-2d') || $this->countModules('top-2e') || $this->countModules('top-2f')) : ?>
<div id="container_top_modules_bg" class="jl_container" style="background-position: 50% 0%" data-stellar-background-ratio="0.5">
<div id="container_top_modules" class="jl_container"><div class="wrapper960">
<?php require( "php/layouts/top_modules.php"); ?>
</div></div></div>
<?php endif; ?>

<div id="container_maincontent_bg" style="background-position: 50% 0%" data-stellar-background-ratio="0.5">
<div id="container_main" class="jl_container"><div class="wrapper960">
<?php require( "php/layouts/main.php"); ?>
</div></div>
</div>

<?php if ($this->countModules('bottom-1a') || $this->countModules('bottom-1b') || $this->countModules('bottom-1c') || $this->countModules('bottom-1d') || $this->countModules('bottom-1e') || $this->countModules('bottom-1f') || $this->countModules('bottom-2a') || $this->countModules('bottom-2b') || $this->countModules('bottom-2c') || $this->countModules('bottom-2d') || $this->countModules('bottom-2e') || $this->countModules('bottom-2f')) : ?>
<div id="container_bottom_modules_bg" style="background-position: 50% 0%" data-stellar-background-ratio="0.5">
<div id="container_bottom_modules" class="jl_container"><div class="wrapper960">
<?php require( "php/layouts/bottom_modules.php"); ?>
</div></div></div>
<?php endif; ?>


<?php if ($this->countModules('base-1a') || $this->countModules('base-1b') || $this->countModules('base-1c') || $this->countModules('base-1d') || $this->countModules('base-1e') || $this->countModules('base-1f') || $this->countModules('base-2a') || $this->countModules('base-2b') || $this->countModules('base-2c') || $this->countModules('base-2d') || $this->countModules('base-2e') || $this->countModules('base-2f') || $this->countModules( 'footer-1' ) || $this->countModules( 'footer-2' )) : ?>
<div id="container_base_modules_bg" style="background-position: 0% 0%" data-stellar-background-ratio="0.5">
<div id="container_base" class="jl_container"><div class="wrapper960">
<?php require( "php/layouts/base.php"); ?>
</div></div></div>
<?php endif; ?>


<div id="container_copyright_footermenu" class="jl_container"><div class="wrapper960">
<?php require( "php/layouts/copyright-footermenu.php"); ?>
</div></div></div>

<?php echo ($body_custom_code); ?>


<?php // Load and Initialise Scripts
include ( "php/scripts.php");
?>

</body>

</html>

Dla mnie problemem jest wykrzaczanie strony :D Chciałbym, żeby logo przekierowywało do głównej, więc pewnie najlepiej będzie to zrobić pierwszym opisanym przez Ciebie sposobem.

adam.lachut
28-09-2017, 18:22
oki :) to jeszcze (może się uda dołączyć zamiast wklejać?):

php/layouts/header.php
php/layouts/responsive_head.php

A.

autoto
29-09-2017, 12:58
Panowie nie mogę wrzucić pliku na forum, mam komunikat o braku zgody na skopiowanie lub zmianę miejsca pliku pomimo, że mam go na swoim dysku. Poniżej link do skompresowanych dwóch plików o których mowa.

https://megawrzuta.pl/download/6183200e2b889207c0590e22d056b486.html

adam.lachut
29-09-2017, 13:25
w header.php wiersz 89 i wiersz 94
i w reasponsive_head.php wiersz 71 i wiersz 74

popraw:
href="index.php"

na
href="/"

A.

autoto
30-09-2017, 12:41
Pomogło, dzięki! Jutro założę odrębny temat z problemem czcionek google vs certyfikat ssl.