Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS][MySQL][PHP]Błąd 404, Jaka przyczyna?
markaz
post
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 20.05.2010

Ostrzeżenie: (0%)
-----


Witam wszystkich.
Mam problem tego typu że w sklepie internetowym którym mam administrować wyskakuje Błąd 404 The requested URL /sklep/produkty,poduszki-ogrodowe.html was not found on this server. Jak mogę usunąć tą usterkę?

Bardzo proszę o pomoc. Ja aż tak nie znam się na programowaniu dopiero się uczę PHP i wdrażam w to wszystko.

Pozdrawiam.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 14)
wookieb
post
Post #2





Grupa: Moderatorzy
Postów: 8 989
Pomógł: 1550
Dołączył: 8.08.2008
Skąd: Słupsk/Gdańsk




No a skąd my mamy wiedzieć skoro nie wiemy nic poza twoja super cenną informacją "mam błąd 404" questionmark.gif
Na jakim silniku oparte, jaki rewrite, jak obsługiwane są linki.

Ten post edytował wookieb 20.05.2010, 10:37:22


--------------------
Go to the top of the page
+Quote Post
markaz
post
Post #3





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 20.05.2010

Ostrzeżenie: (0%)
-----


http://hitgarden.com/sklep/ adres stronki. Silnik bazy MySql, serwer apatche. Strona jest napisana w php i w Javie. Mam również system CMS do obsługi tego sklepu ale niestety nie działa niewiem czy z tego powodu że wywala ten błąd 404.
Jeśli jeszcze jakieś info to podam.

Pozdrawiam
Go to the top of the page
+Quote Post
sadistic_son
post
Post #4





Grupa: Zarejestrowani
Postów: 1 495
Pomógł: 245
Dołączył: 1.07.2009
Skąd: Bydgoszcz

Ostrzeżenie: (0%)
-----


WKLEJ KOD! Inaczej możemy Ci powróżyć z fusów co najwyżej!

Ten post edytował sadistic_son 20.05.2010, 10:50:36


--------------------
Uśpieni przez system, wychowani przez media,
Karmieni zmysłami, próżnymi żądzami...

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Jesteś zbyt leniwy, żeby się zarejestrować? Ja jestem zbyt leniwy aby Ci pomóc!
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Go to the top of the page
+Quote Post
pedro84
post
Post #5





Grupa: Nieautoryzowani
Postów: 2 249
Pomógł: 305
Dołączył: 2.10.2006

Ostrzeżenie: (0%)
-----


Mi to wygląda na problem z plikami htaccess.

Poza tym, Java != Javascript, a chyba o ten drugi Ci chodziło.

Cytat
Bardzo proszę o pomoc. Ja aż tak nie znam się na programowaniu dopiero się uczę PHP i wdrażam w to wszystko.
\
To po co sie bierzesz za coś na czym "aż tak się nie znasz"?


--------------------
Google knows the answer...
Go to the top of the page
+Quote Post
markaz
post
Post #6





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 20.05.2010

Ostrzeżenie: (0%)
-----


kod z index.php
<?php
session_start();
require_once('config.php');
include('includes.php');
$smarty -> display('index.tpl');

?>

kod z index.tpl


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
{if $site =='error404'}
<title>page not found - {$vars.siteTittle}</title>
{else}
<title>{if !empty($text.nazwa)}{$text.nazwa} - {/if}{$vars.siteTittle}</title>
{/if}
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=utf-8" />
<meta name="description" content="{$vars.description}" />
<meta name="keywords" content="{$vars.keywords}" />
<meta name="Robots" content="index,follow" />
{$lang}
{* -- język -- *}
{if $lang == ''}
{config_load file="pl.tpl"}
{else}
{config_load file="`$lang`.tpl"}
{/if}

{* -- style -- *}
<link rel="StyleSheet" type="text/css" href="css/style.css"/>
<link rel="StyleSheet" type="text/css" href="css/datechooser.css"/>
<link rel="StyleSheet" type="text/css" href="css/thickbox.css"/>
{if $system == 'mac'}
<link rel="StyleSheet" type="text/css" href="css/style_mac.css"/>
{/if}

{* -- style dla Internet Exploler -- *}
<!--[if lt IE 7]>
<link rel="StyleSheet" type="text/css" href="css/style_ie.css"/>
<![endif]-->
<!--[if gte IE 7]>
<link rel="StyleSheet" type="text/css" href="css/style_ie7.css"/>
<![endif]-->
{* -- style lightbox -- *}
<link rel="StyleSheet" type="text/css" href="css/lightbox.css"/>

{include file="site/javascript.tpl"}
</head>
<body>
{if $site == "error404"}
{include file="site/error404.tpl"}
{elseif ($site == "thickbox")||($site == "rozmiar")}
{include file="site/thickbox.tpl"}
{else}
{include file="site/main.tpl"}
{/if}
</body>
</html>

plik htaccess mam w głównym katalogu ale jest on pusty właśnie nie wiem dlaczego.

chciałbym właśnie ten problem jakoś naprawić i się czegoś nauczyć

Pozdrawiam.
Go to the top of the page
+Quote Post
banki
post
Post #7





Grupa: Zarejestrowani
Postów: 109
Pomógł: 1
Dołączył: 23.11.2007

Ostrzeżenie: (0%)
-----


linki masz zrobione pod mod rewrite, to do htaccesa zapewne musisz dopisać to
Go to the top of the page
+Quote Post
markaz
post
Post #8





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 20.05.2010

Ostrzeżenie: (0%)
-----


"banki" ale co mam wpisać do htaccesa?to co mam w index.tpl? czyli mam edytować tego htaccesa w głównym katalogu?
Go to the top of the page
+Quote Post
pedro84
post
Post #9





Grupa: Nieautoryzowani
Postów: 2 249
Pomógł: 305
Dołączył: 2.10.2006

Ostrzeżenie: (0%)
-----


Cytat(markaz @ 20.05.2010, 12:27:01 ) *
"banki" ale co mam wpisać do htaccesa?to co mam w index.tpl? czyli mam edytować tego htaccesa w głównym katalogu?

Żartujesz? No ULRe musisz "przepisać". Nie, nie to co w index.php. Mówiłem, nie bierz się za coś, o czym pojęcia zielonego nie masz.


--------------------
Google knows the answer...
Go to the top of the page
+Quote Post
wookieb
post
Post #10





Grupa: Moderatorzy
Postów: 8 989
Pomógł: 1550
Dołączył: 8.08.2008
Skąd: Słupsk/Gdańsk




Pokaz zawartość swojego htaccess i który plik odpowiada za wyswietlanie kategorii?


--------------------
Go to the top of the page
+Quote Post
markaz
post
Post #11





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 20.05.2010

Ostrzeżenie: (0%)
-----


plik htaccess w głównym katalogu jest pusty.
Plik produkty.php odpowiada za wyświetlanie kategori poniżej kod:

<?php

$kategoria = $var1;
$grupa = $var2;
$id = $var3;

if (empty($kategoria)){
$text = getOneWhere($langPrefix.'text', "sekcja = 'strona_glowna'");
}
else {
$text['nazwa'] = $vars['produkty_tytul'];
}


$list['kategorie'] = getListWhere($langPrefix.'kategoria', 'pozycja asc', "sekcja = 'produkty' and ukryty = 0");
$contents="sekcja/produkty.tpl";

if (!empty($kategoria)) {
$kategoria = getOneWhere($langPrefix.'kategoria', "link_id = '".$kategoria."'");
$list['grupy'] = getListWhere($langPrefix.'subtext', 'pozycja asc', "sekcja = 'produkty' and kategoria = '".$kategoria['id']."'and ukryty = 0");
$_SESSION['last_produkt']['kategoria'] = $kategoria['link_id'];

if (count($list['grupy']) == 1) {
if (empty($list['grupy'][0]['image'])){
$grupa = $list['grupy'][0]['link_id'];
$hide_submenu = true;
};
};

if (!empty($grupa)) {
$grupa = getOneWhere($langPrefix.'subtext', "link_id = '".$grupa."'");

$list['produkty'] = getListWhere($langPrefix.'kolor', 'pozycja asc', "parent_id = '".$grupa['id']."'and ukryty = 0");
$_SESSION['last_produkt']['grupa'] = $grupa['link_id'];

foreach ($list['produkty'] as $key => $listValue) {
$list['flas_info'].= $listValue['webimage']."|";
$list['flas_info'].= "produkty,".$kategoria['link_id'].",".$grupa['link_id'].",". $listValue['link_id'].".html;";
}

$list['flas_info'].= "&nograss=";
foreach ($list['produkty'] as $key => $listValue) {
if ($listValue['trawa'] == 0 ) {
$list['flas_info'].= "true;";
}
else {
$list['flas_info'].= "false;";
}
}
}

if (!empty($id)) {
$produkt = getOneWhere($langPrefix.'kolor', "link_id = '".$id."' and parent_id = '".$grupa['id']."'");
$_SESSION['last_produkt']['produkt'] = $produkt['link_id'];

$list['ceny'] = getListWhere($langPrefix.'cena', 'pozycja asc', "parent_id = '".$produkt['id']."'and ukryty = 0");

// //$cena['rozmiar'] =
//$rozmiar = getOneWhere($langPrefix.'rozmiar', "parent_id = '".$cena['rozmiar'] ."'");
// //$cena['image'] = getOneWhere($langPrefix.'images', "sekcja = 'rysunki_techniczne' parent_id = '".$cena['image'] ."'");
//$image = getOneWhere($langPrefix.'images', "sekcja = 'rysunki_techniczne' parent_id = '".$cena['image'] ."'");

foreach ($list['ceny'] as $key => $listValue) {
$temp = getOneWhere($langPrefix.'rozmiar', "id = '".$listValue['rozmiar']."'");
$list['ceny'][$key]['rozmiar'] = $temp['nazwa'];
$temp = getOneWhere($langPrefix.'images', "id = '".$listValue['image']."'");
$list['ceny'][$key]['image'] = $temp['image'];
$list['ceny'][$key]['nazwa_rysunek'] = $temp['nazwa'];
}

$produkt['cena'] = $list['ceny'];
$produkt['cena_count'] = count($produkt['cena']);
$produkt['flashvars']="images=".$produkt['webimage'].";".$produkt['image'].";".$produkt['nazwa'];
if ($produkt['trawa'] == 0 ) {
$produkt['flashvars'].= "&nograss=true";
}
$nextId =array();

foreach ($list['produkty'] as $key => $listValue) {
if($listValue['link_id'] == $id){
$nextId['id'] = $key;
}
}

$nextId['prev'] = $nextId['id'] - 1;
$nextId['next'] = $nextId['id'] + 1;

if ($nextId['prev'] < 0 ){
$nextId['prev'] = $list['produkty'][(count($list['produkty']) - 1)]['link_id'];
}
else {
$nextId['prev'] = $list['produkty'][$nextId['prev']]['link_id'];
}

if (!empty($list['produkty'][$nextId['next']])){
$nextId['next'] = $list['produkty'][$nextId['next']]['link_id'];
}
else {
$nextId['next'] = $list['produkty'][0]['link_id'];
}
}
}
else {
$image = getOneWhere($langPrefix.'images', "sekcja = 'strona_glowna_image' and parent_id = 0");
}

?>
Go to the top of the page
+Quote Post
wookieb
post
Post #12





Grupa: Moderatorzy
Postów: 8 989
Pomógł: 1550
Dołączył: 8.08.2008
Skąd: Słupsk/Gdańsk




Więc sprawdź w swoim systemi jaki htaccess powinien działać w twoim serwisie. Możemy rozwiązać jeden problem ale przyjdą następne.
I UŻYWAJ BBCODE

Ten post edytował wookieb 20.05.2010, 12:40:26


--------------------
Go to the top of the page
+Quote Post
markaz
post
Post #13





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 20.05.2010

Ostrzeżenie: (0%)
-----


Jeśli chodzi o przekierowania strony to w moim serwisie niema. A jak mogę sprawdzić rodzaj htaccess w moim serwisie? Strona jest na serwerze AZ.pl.

Pozdrawiam
Go to the top of the page
+Quote Post
wookieb
post
Post #14





Grupa: Moderatorzy
Postów: 8 989
Pomógł: 1550
Dołączył: 8.08.2008
Skąd: Słupsk/Gdańsk




Powtarzam, dowiedz się jaka powinna być zawartość twojego pliku htaccess dla tego serwisu. Kropka.
Nie ma czegoś takiego jak rodzaj htaccess i nie chodzi tutaj o przekierowania.


--------------------
Go to the top of the page
+Quote Post
markaz
post
Post #15





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 20.05.2010

Ostrzeżenie: (0%)
-----


znalazłem pliczek htacces z backapu wkleiłem i śmiga stronka. Ale mam jeszcze jedno pytanie. Chciałbym utworzyć teraz subdomenę z hitgarden.com/sklep na sklep.hitgarden.com. Co muszę zmienić w pliku htacces żeby się nie posypało? dziekuje za zainteresowanie moim tematem.
Z pliku htacces
RewriteEngine on

RewriteRule ^.+(/file/.+)$ http://www.hitgarden.com/sklep/$1 [L]
RewriteRule ^.+(flash/.+)$ $1 [L]
RewriteRule ^.+(xml/.+)$ $1 [L]
RewriteRule ^.+(js/.+)$ $1 [L][PHP][/PHP]
RewriteRule ^.+(img/.+)$ $1 [L]
RewriteRule ^.+(css/.+)$ $1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z-_0-9]+)/([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+).html/?$ index.php?lang=$1&site=$2&var1=$3&var2=$4&var3=$5&var4=$6&var5=$7 [L]
RewriteRule ^([a-zA-Z-_0-9]+)/([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+).html/?$ index.php?lang=$1&site=$2&var1=$3&var2=$4&var3=$5&var4=$6 [L]
RewriteRule ^([a-zA-Z-_0-9]+)/([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+).html/?$ index.php?lang=$1&site=$2&var1=$3&var2=$4&var3=$5 [L]
RewriteRule ^([a-zA-Z-_0-9]+)/([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+).html/?$ index.php?lang=$1&site=$2&var1=$3&var2=$4 [L]
RewriteRule ^([a-zA-Z-_0-9]+)/([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+).html/?$ index.php?lang=$1&site=$2&var1=$3 [L]
RewriteRule ^([a-zA-Z-_0-9]+)/([a-zA-Z-_0-9]+).html/?$ index.php?lang=$1&site=$2 [L]
RewriteRule ^([a-zA-Z-_0-9]+)/?$ index.php?lang=$1 [L]

RewriteRule ^([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+).html/?$ index.php?site=$1&var1=$2&var2=$3&var3=$4&var4=$5 [L]
RewriteRule ^([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+).html/?$ index.php?site=$1&var1=$2&var2=$3&var3=$4 [L]
RewriteRule ^([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+).html/?$ index.php?site=$1&var1=$2&var2=$3 [L]
RewriteRule ^([a-zA-Z-_0-9]+),([a-zA-Z-_0-9]+).html/?$ index.php?site=$1&var1=$2 [L]
RewriteRule ^([a-zA-Z-_0-9]+).html/?$ index.php?site=$1 [L]
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 04:48