northwest
9.08.2008, 21:32:16
Witam,
mam następujący plik .htaccess:
RewriteEngine On
RewriteRule ^index/([^-]+)/([^-]+)/([^-]+).html$ index.php?peta=$1&lista=$2 [L]
RewriteRule ^index2/([^-]+)/([^-]+)/([^-]+).html$ index.php?peta=$1&lista=$2 [L]
Nie wiem czemu, ale serwer ciągle mi zwraca błąd:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@bla.pl and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Wiecie może co robię źle??
Z góry dzięki za pomoc,
pozdrawiam Northwest
Pitter
9.08.2008, 21:39:02
A dlaczego dwa razy napisałeś to samo?
RewriteRule ^index/([^-]+)/([^-]+)/([^-]+).html$ index.php?peta=$1&lista=$2 [L]
po co to podkreślone? Przecież podajesz tylko dwie zmienne w adresie prawdziwym a tam wpisałeś że ma zastępować trzy. Nie znam się za dobrze ale raczej o to chodzi. Pozdrawiam Pitter
northwest
9.08.2008, 21:43:23
Poprawiłem na coś takiego:
RewriteEngine On
RewriteRule ^index/([^-]+).html$ index.php?peta=$1 [L]
RewriteRule ^index2/([^-]+)/([^-]+)/([^-]+).html$ index.php?peta=$1&lista=$2 [L]
ale dalej nie działa

(
shazarre
9.08.2008, 22:39:09
Kod
RewriteEngine On
RewriteRule ^index/([^-]+).html$ index.php?peta=$1
RewriteRule ^index2/([^-]+)/([^-]+).html$ index.php?peta=$1&lista=$2 [L]
northwest
9.08.2008, 22:52:55
nie działa:(
Kenexos
9.08.2008, 23:56:32
Polecam ci ten poradnik!
Właśnie go przeczytałem sprawdziłem czy u mnie działa i hura!! Działa!
A jeszcze dzisiaj rano miałem taki problem jak ty na xampp!!;]
O to ten poradnik:
http://doc.piecyk.org/modRewrite.pdf
northwest
10.08.2008, 09:16:02
przeczytałem ten artykuł, ale dalej nie wiem co jest źle:( według tych opisów mój przykład jest okey...:/
a mod rewrite działa na 100%..
takie coś u mnie działa:
RewriteEngine On
RewriteRule ^index2/([^-]+)/([^-]+).html$ index.php?peta=$1&lista=$2 [L]
tylko z 2 nie chce;/
Kenexos
10.08.2008, 09:44:50
masz to na xampp?? to odblokuj w apache mod rewrite
northwest
10.08.2008, 11:08:58
to jest apache.
mod rewrite działa na 100%..
takie coś u mnie działa:
RewriteEngine On
RewriteRule ^index2/([^-]+)/([^-]+).html$ index.php?peta=$1&lista=$2 [L]
tak wygląda mój plik: www.udanewakacje.net/nowy/test.txt
Pitter
10.08.2008, 12:46:14
ALe dalej ci się wyświetla błąd czy po prostu nie przekierowuje?
northwest
10.08.2008, 15:33:17
ciągle ten sam błąd... :/
RewriteEngine On
RewriteRule ^([a-z0-9\-\_]+)\/([a-z0-9\-\_]+)\/([a-z0-9\-\_]+).html$ index.php?peta=$1&woj=$2&modrw [L]
RewriteRule ^([a-z0-9\-\_]+)\/([a-z0-9\-\_]+).html$ index.php?peta=$1&modrw [L]
zaskoczyło coś takiego, dzięki za pomoc:)))
henio
17.08.2008, 14:22:33
Plik .htaccess
<?php
Options FollowSymLinks
RewriteEngine On
# Zmiana na przyjazne adresy w skrypcie dotycz±cym strony głównej
RewriteRule ^index.html$ index.php
# Zmiana na przyjazne adresy w skrypcie dotycz±cym newsów
RewriteRule ^pokaz-news-(.+)-(.+).html$ pokaz_news.php?id_news=$1&tytul=$2
?>
Nie jestem specjalistą od wyrażeń regularnych, ale szukałem w internecie jak zamienić ciąg "ble ble ble" na "ble-ble-ble" ale nie znalazłem. Pytam się więc o jakiś link do artykułu opisującego taką zamianę o jaką mi chodzi.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę
kliknij tutaj.