Obsah fóra
PravidláRegistrovaťPrihlásenie




Odpovedať na tému [ 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
Príspevok NapísalOffline : 16.03.2014 13:57

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: 13348
Témy: 1496
Bydlisko: Bratislava
Príspevok NapísalOffline : 16.03.2014 14:19

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 & 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 | iPhone X 256 GB & Pitaka Aramid | 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 | Ubuntu Server
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
Príspevok Napísal autor témyOffline : 16.03.2014 14:38

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: 13348
Témy: 1496
Bydlisko: Bratislava
Príspevok NapísalOffline : 16.03.2014 14:41

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 & 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 | iPhone X 256 GB & Pitaka Aramid | 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 | Ubuntu Server
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
Príspevok Napísal autor témyOffline : 16.03.2014 14:58

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: 13348
Témy: 1496
Bydlisko: Bratislava
Príspevok NapísalOffline : 16.03.2014 15:17

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 & 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 | iPhone X 256 GB & Pitaka Aramid | 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 | Ubuntu Server
Odpovedať na tému [ Príspevkov: 6 ] 


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 PHP, ASP

1

563

13.08.2012 8:23

Ďuri Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Aktualizácia joomla chyba 404

v Redakčné systémy

0

481

27.04.2016 20:56

iggi9797 Zobrazenie posledných príspevkov

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

v Webhosting a servery

7

745

22.11.2008 14:08

jankosta Zobrazenie posledných príspevkov

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

v Ostatné

7

684

29.08.2008 1:34

JanoF Zobrazenie posledných príspevkov

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

v PHP, ASP

2

613

12.08.2008 18:59

Gosty Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Vlastne chybové stránky 404

v PHP, ASP

3

1007

10.04.2006 17:13

snake2 Zobrazenie posledných príspevkov

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

v PHP, ASP

7

853

07.10.2011 16:52

1daemon1 Zobrazenie posledných príspevkov

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

v Krčma

6

772

14.03.2011 7:33

jtbs Zobrazenie posledných príspevkov

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

v Ostatné

2

334

10.10.2013 19:37

neopagan Zobrazenie posledných príspevkov

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

v Správy pre vedenie fóra

15

3404

05.05.2007 11:15

JanoF Zobrazenie posledných príspevkov

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

v Ostatné

6

613

10.06.2010 13:29

coldak Zobrazenie posledných príspevkov

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

v Sieťové a internetové programy

0

434

06.06.2011 20:19

p4tooo Zobrazenie posledných príspevkov

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

v Internetový marketing, SEO, reklama

8

997

07.09.2009 21:51

rooobertek Zobrazenie posledných príspevkov

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

v Siete

4

393

26.02.2012 21:31

risco Zobrazenie posledných príspevkov

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

v PHP, ASP

1

501

06.10.2010 12:15

stenley Zobrazenie posledných príspevkov

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

v PHP, ASP

2

425

29.02.2008 16:38

Tominator Zobrazenie posledných príspevkov


Nemôžete zakladať nové témy v tomto fóre
Nemôžete odpovedať na témy v tomto fóre
Nemôžete upravovať svoje príspevky v tomto fóre
Nemôžete mazať svoje príspevky v tomto fóre

Skočiť na:  

Powered by phpBB Jarvis © 2005 - 2024 PCforum, webhosting by WebSupport, secured by GeoTrust, edited by JanoF
Ako väčšina webových stránok aj my používame cookies. Zotrvaním na webovej stránke súhlasíte, že ich môžeme používať.
Všeobecné podmienky, spracovanie osobných údajov a pravidlá fóra