[ Príspevkov: 6 ] 
AutorSpráva
Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 24.11.09
Prihlásený: 21.05.20
Príspevky: 195
Témy: 75 | 75
NapísalOffline : 16.03.2014 13:57 | Joomla - redirect page 404

Ahojte,

vložil som do .htaccess ErrorDocument 404 /index.php aby všetky neexistujúce stránky končili na index.php, keď použijem mydomains.sk/jndjnd tak ma to presmeruje na index.php ale keď sa použije stará url mydomains.sk/?option=com_content&view=article&id=58792&Itemid=9852 tak mi vypíše 404 z hostingu a nepresmeruje ma to na index.php.

Chcem aby mydomains.sk/?option=com_content&view=article&id=58792&Itemid=9852 tiež končilo na index.php

Kde môže byť chyba?

Ď.


Offline

Prevádzkovateľ fóra
Prevádzkovateľ fóra
Joomla - redirect page 404

Registrovaný: 01.05.05
Príspevky: 13557
Témy: 1483 | 1483
Bydlisko: Bratislava
NapísalOffline : 16.03.2014 14:19 | Joomla - redirect page 404

do index.php si niekde na zaciatok medzi <?php .... ?> vloz toto

Kód:
if (stristr($_SERVER["REQUEST_URI"],'?') && (empty($_POST))) {
     header('Location: http://mydomains.sk/index.php');
}


napada ma ale, ze tvoj htaccess kam si pridal ErrorDocument 404 si pridal mozno za existujuce nejake rewrite pravidla a preto to vypisuje 404 z hostingu...lebo

mydomains.sk/?option.... = mydomains.sk/index.php?option....

ak mas teda ak teda nemas v .htaccess nastavene nieco ine


_________________
Streacom DA2 | SilverStone Titanium SX800-LTI 800W | ASRock X299E-ITX/ac | Intel Core i9-9980XE & be quiet! Dark Rock TF | Kingston HyperX Impact 64 GB DDR4 2666 MHz | NVIDIA Titan RTX 24 GB | Intel SSD Optane 905P 480 GB NVMe U.2 & Intel SSD 750 1,2 TB NVMe U.2 & Intel SSD 660p 2 TB NVMe M.2 & Seagate BackUp Plus Portable 56 TB USB | 55" 4K OLED Dell Alienware AW5520QF | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 11 Enterprise | APC Back-UPS BE-850 VA | Lenovo ThinkPad X1 Carbon | SilverStone ML05B Milo | Corsair SF600 SFX 600W | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 & NOCTUA NH-L12S | Kingston HyperX Savage 32 GB DDR4 2400 MHz | NVIDIA GeForce GT 710 1 GB | Intel SSD Optane Memory 32 GB NVMe M.2 & Intel SSD 730 240 GB SATA & Samsung SSD 860 1 TB | Ubuntu 24.04 LTS | Dell Wyse 3040 | Intel Atom x5-Z8350 | 2 GB DDR3 1600 MHz | 16 GB eMMC | 24" EIZO FlexScan EV2451 | Alpine Linux + XFCE4
Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 24.11.09
Prihlásený: 21.05.20
Príspevky: 195
Témy: 75 | 75
Napísal autor témyOffline : 16.03.2014 14:38 | Joomla - redirect page 404

Aj po vlozeni kodu je vysledok rovnaky.

Tu je .htaccess

Kód:
##
# @package      Joomla
# @copyright   Copyright (C) 2005 - 2013 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 just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
##

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

## Mod_rewrite in use.

RewriteEngine On

## 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 base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out 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 homepage
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 following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

# RewriteBase /
ErrorDocument 404 /index.php

## 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 request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# 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.


Skusal som aj ErrorDocument 404 /index.php dat na uvod ale nepomohlo.

Ďakujem za help.

M.


Offline

Prevádzkovateľ fóra
Prevádzkovateľ fóra
Joomla - redirect page 404

Registrovaný: 01.05.05
Príspevky: 13557
Témy: 1483 | 1483
Bydlisko: Bratislava
NapísalOffline : 16.03.2014 14:41 | Joomla - redirect page 404

A ty si akoze zrusil joomlu ktoru tam mas podla toho odkazu ako som sa dovtipil?

//lebo ak mas joomlu a chces to v nej spravit, tak si otvor /system/error.php a tam najdi

Kód:
defined( '_JEXEC' ) or die( 'Restricted access' );
?>


a za to pridaj:

Kód:
<?php
header("Location: http://mydomains.sk/");
exit;
?>


_________________
Streacom DA2 | SilverStone Titanium SX800-LTI 800W | ASRock X299E-ITX/ac | Intel Core i9-9980XE & be quiet! Dark Rock TF | Kingston HyperX Impact 64 GB DDR4 2666 MHz | NVIDIA Titan RTX 24 GB | Intel SSD Optane 905P 480 GB NVMe U.2 & Intel SSD 750 1,2 TB NVMe U.2 & Intel SSD 660p 2 TB NVMe M.2 & Seagate BackUp Plus Portable 56 TB USB | 55" 4K OLED Dell Alienware AW5520QF | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 11 Enterprise | APC Back-UPS BE-850 VA | Lenovo ThinkPad X1 Carbon | SilverStone ML05B Milo | Corsair SF600 SFX 600W | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 & NOCTUA NH-L12S | Kingston HyperX Savage 32 GB DDR4 2400 MHz | NVIDIA GeForce GT 710 1 GB | Intel SSD Optane Memory 32 GB NVMe M.2 & Intel SSD 730 240 GB SATA & Samsung SSD 860 1 TB | Ubuntu 24.04 LTS | Dell Wyse 3040 | Intel Atom x5-Z8350 | 2 GB DDR3 1600 MHz | 16 GB eMMC | 24" EIZO FlexScan EV2451 | Alpine Linux + XFCE4
Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 24.11.09
Prihlásený: 21.05.20
Príspevky: 195
Témy: 75 | 75
Napísal autor témyOffline : 16.03.2014 14:58 | Joomla - redirect page 404

Mam tam toto: /templates/system/error.php

Kód:
<?php
/**
 * @package      Joomla.Site
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license      GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
if (!isset($this->error)) {
   $this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
   $this->debug = false;
}
//get language and direction
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
?>


a doplnil som to takto:

Kód:
<?php
/**
 * @package      Joomla.Site
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license      GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
if (!isset($this->error)) {
   $this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
   $this->debug = false;
}
//get language and direction
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
?>

<?php
header("Location: http://mydomains.sk/");
exit;
?>


To iste, ziadny vysledok.

Dakujem.

M.


Offline

Prevádzkovateľ fóra
Prevádzkovateľ fóra
Joomla - redirect page 404

Registrovaný: 01.05.05
Príspevky: 13557
Témy: 1483 | 1483
Bydlisko: Bratislava
NapísalOffline : 16.03.2014 15:17 | Joomla - redirect page 404

Zjavne asi ina verzia z akej som vychadzal, resp nasiel prejdi si http://forum.joomla.org/viewtopic.php?t=282063 zjavne musis mat tento modul http://extensions.joomla.org/extensions ... /sef/10134


_________________
Streacom DA2 | SilverStone Titanium SX800-LTI 800W | ASRock X299E-ITX/ac | Intel Core i9-9980XE & be quiet! Dark Rock TF | Kingston HyperX Impact 64 GB DDR4 2666 MHz | NVIDIA Titan RTX 24 GB | Intel SSD Optane 905P 480 GB NVMe U.2 & Intel SSD 750 1,2 TB NVMe U.2 & Intel SSD 660p 2 TB NVMe M.2 & Seagate BackUp Plus Portable 56 TB USB | 55" 4K OLED Dell Alienware AW5520QF | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 11 Enterprise | APC Back-UPS BE-850 VA | Lenovo ThinkPad X1 Carbon | SilverStone ML05B Milo | Corsair SF600 SFX 600W | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 & NOCTUA NH-L12S | Kingston HyperX Savage 32 GB DDR4 2400 MHz | NVIDIA GeForce GT 710 1 GB | Intel SSD Optane Memory 32 GB NVMe M.2 & Intel SSD 730 240 GB SATA & Samsung SSD 860 1 TB | Ubuntu 24.04 LTS | Dell Wyse 3040 | Intel Atom x5-Z8350 | 2 GB DDR3 1600 MHz | 16 GB eMMC | 24" EIZO FlexScan EV2451 | Alpine Linux + XFCE4
 [ Príspevkov: 6 ] 


Joomla - redirect page 404



Podobné témy

 Témy  Odpovede  Zobrazenia  Posledný príspevok 
V tomto fóre nie sú ďalšie neprečítané témy.

404 redirect

v Backend

1

715

13.08.2012 8:23

Ďuri

V tomto fóre nie sú ďalšie neprečítané témy.

Aktualizácia joomla chyba 404

v CMS

0

558

27.04.2016 20:56

iggi9797

V tomto fóre nie sú ďalšie neprečítané témy.

error 404

v Ostatné

7

778

29.08.2008 1:34

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

chyba 404

v Hosting, servery a domény

7

836

22.11.2008 14:08

jankosta

V tomto fóre nie sú ďalšie neprečítané témy.

404 error prob

v Backend

2

697

12.08.2008 18:59

Gosty

V tomto fóre nie sú ďalšie neprečítané témy.

Vlastne chybové stránky 404

v Backend

3

1113

10.04.2006 17:13

snake2

V tomto fóre nie sú ďalšie neprečítané témy.

problem s header 404

v Backend

7

920

07.10.2011 16:52

1daemon1

V tomto fóre nie sú ďalšie neprečítané témy.

Chyba 404 v inom podaní

v Krčma

6

837

14.03.2011 7:33

jtbs

V tomto fóre nie sú ďalšie neprečítané témy.

Redirect odkazov

v Oznámenia a návrhy

15

3684

05.05.2007 11:15

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

redirect htaccess

v Ostatné

2

408

10.10.2013 19:37

neopagan

V tomto fóre nie sú ďalšie neprečítané témy.

.htaccess redirect?

v Ostatné

6

682

10.06.2010 13:29

coldak

V tomto fóre nie sú ďalšie neprečítané témy.

google redirect

v Sieťové programy

0

509

06.06.2011 20:19

p4tooo

V tomto fóre nie sú ďalšie neprečítané témy.

WIfi router redirect

v Siete

4

474

26.02.2012 21:31

risco

V tomto fóre nie sú ďalšie neprečítané témy.

PHP + htaccess redirect ...

v Backend

1

566

06.10.2010 12:15

stenley

V tomto fóre nie sú ďalšie neprečítané témy.

problem s redirect

v Backend

2

513

29.02.2008 16:38

Tominator

V tomto fóre nie sú ďalšie neprečítané témy.

JS:Redirect [TRJ]

v Firewally a bezpečnosť

0

979

25.12.2009 13:25

Matho



© 2005 - 2026 PCforum, edited by JanoF