![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 5 Pomógł: 0 Dołączył: 1.03.2011 Ostrzeżenie: (0%) ![]() ![]() |
witam
![]() ucze sie programowac w OOP, rozdzielilem juz sobie projekt na model, widok i kontroler. no i mam dwa pliki: index.php ktory wyswietla z bazy tytuly i show.php, ktore wyswietla opis. no i jak sie teraz zabrac za to, zeby stworzyc cos w stylu /show?id=2 a nie /show.php?id=2 ? pozdrawiam |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 690 Pomógł: 92 Dołączył: 6.02.2011 Ostrzeżenie: (0%) ![]() ![]() |
mod_rewrite?
|
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 5 Pomógł: 0 Dołączył: 1.03.2011 Ostrzeżenie: (0%) ![]() ![]() |
no dzieki, ale nie do konca to kapuje.
samo htaccess chyba poprawnie wlaczylem, bo cos tam lapie i czasem sie blokuje, wiec dziala, ale jak zrobic jak mam cos takiego:
tak chce miec w pliku index.php, no i co teraz mam wpisac w tym .htaccess ? mam pliki index.php i show.php nie wiem kompletnie jak sie za to zabrac... probowalem tak: Kod RewriteRule ^show?id=([^-]+)$ /show.php?id=$1 ale to mi cos nie dziala. krotko mowiac jak zamiast wyswietlania localhost/show.php?id=2 zrobic localhost/show?id=2 ? pozdrawiam |
|
|
![]()
Post
#4
|
|
![]() Grupa: Zarejestrowani Postów: 763 Pomógł: 117 Dołączył: 15.03.2010 Skąd: void Ostrzeżenie: (0%) ![]() ![]() |
Proszę: http://corz.org/serv/tricks/htaccess2.php
Przypuszczam, że Ci się przyda ![]() Jeśli i tego nie zrozumiesz to pisz; wtedy wytłumaczę ![]() Pozdrawiam! -------------------- Pomogłem? Kliknij `Pomógł`. To nic nie kosztuje, a mnie usatysfakcjonuje! ;)
|
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 5 Pomógł: 0 Dołączył: 1.03.2011 Ostrzeżenie: (0%) ![]() ![]() |
dzieki juz mniej wiecej kapuje, ale dalej mam problem.
zrobilem tak: Kod RewriteRule ^show /show.php i teraz mi wywala blad Internal Server Error Cytat The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost 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. prosilbym o rozwiazanie ![]() |
|
|
![]()
Post
#6
|
|
![]() Grupa: Zarejestrowani Postów: 690 Pomógł: 92 Dołączył: 6.02.2011 Ostrzeżenie: (0%) ![]() ![]() |
Nie zakończyłeś
RewriteRule ^show$ /show.php [L] |
|
|
![]()
Post
#7
|
|
![]() Grupa: Zarejestrowani Postów: 763 Pomógł: 117 Dołączył: 15.03.2010 Skąd: void Ostrzeżenie: (0%) ![]() ![]() |
1. Plik zapisujesz w UTF-8, a serwer może interpretować tylko ANSI;
2. Masz wyłączoną opcję mod_rewrite w konfiguracji serwera Apache. 3. Kolega wyżej stwierdził fakt... ![]() Ten post edytował modern-web 1.03.2011, 21:46:04 -------------------- Pomogłem? Kliknij `Pomógł`. To nic nie kosztuje, a mnie usatysfakcjonuje! ;)
|
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 4.07.2025 - 22:53 |