Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]modRule - nie działa
rcdcd
post
Post #1





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 19.04.2008

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


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.
Go to the top of the page
+Quote Post
DREEMus
post
Post #2





Grupa: Zarejestrowani
Postów: 286
Pomógł: 34
Dołączył: 4.09.2008
Skąd: Wrocław

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


nic dziwnego ...

Kod
RewriteEngine On
RewriteRule ^ogloszenia-([^-]+).html$ ogloszenia.php?id=$1
Go to the top of the page
+Quote Post
rcdcd
post
Post #3





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 19.04.2008

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


dzieki (IMG:http://forum.php.pl/style_emoticons/default/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


Ten post edytował rcdcd 12.04.2009, 18:56:15
Go to the top of the page
+Quote Post
DREEMus
post
Post #4





Grupa: Zarejestrowani
Postów: 286
Pomógł: 34
Dołączył: 4.09.2008
Skąd: Wrocław

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


Czemu w linku masz "." (IMG:http://forum.php.pl/style_emoticons/default/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Ł (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)

Ten post edytował DREEMus 12.04.2009, 19:06:09
Go to the top of the page
+Quote Post
rcdcd
post
Post #5





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 19.04.2008

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


niestety to samo. [L] nie pomogło,, usunięcie . czy ./ tez nie
Go to the top of the page
+Quote Post
DREEMus
post
Post #6





Grupa: Zarejestrowani
Postów: 286
Pomógł: 34
Dołączył: 4.09.2008
Skąd: Wrocław

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


Używasz vHost'ów (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) Sprawdź ścieżki jeszcze raz ... Jaki masz serwer (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 23.08.2025 - 04:27