Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]modRule - nie działa
Forum PHP.pl > Forum > Przedszkole
rcdcd
naczytałem się o mod rwerite, w pliku .htaccess w katalogu umiescilem

Kod
RewriteEngine On
RewriteRule ^ogloszenia-([^-]+).html$ogloszenia.php?id=$1


i

serwer głupieje ... dostaje:

Cytat
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, postmaster 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.
DREEMus
nic dziwnego ...

Kod
RewriteEngine On
RewriteRule ^ogloszenia-([^-]+).html$ ogloszenia.php?id=$1
rcdcd
dzieki smile.gif

kolejny problem

generuje link:

Cytat
<a href="./ogloszenia-2.html">wwwwww</a>


plik htaccess j.w.

i dostaję:

Kod
Bad Request
Your browser sent a request that this server could not understand.

Invalid URI in request GET /~stw/ogloszenia/ogloszenia-2.html HTTP/1.1
DREEMus
Czemu w linku masz "." questionmark.gif

  1. <a href="/ogloszenia-2.html">Ogłoszenie nr 2</a>

dopisz [L] z tyłu ...
Kod
RewriteEngine On
RewriteRule ^ogloszenia-([^-]+).html$ ogloszenia.php?id=$1 [L]


PS. Jeżeli post był pomocny, kliknij POMÓGŁ biggrin.gif
rcdcd
niestety to samo. [L] nie pomogło,, usunięcie . czy ./ tez nie
DREEMus
Używasz vHost'ów questionmark.gif Sprawdź ścieżki jeszcze raz ... Jaki masz serwer questionmark.gif
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.
Invision Power Board © 2001-2025 Invision Power Services, Inc.