Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> .htaccess nie działają niektóre podstrony
Lejto
post
Post #1





Grupa: Zarejestrowani
Postów: 1 385
Pomógł: 48
Dołączył: 23.05.2007

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


Mam problem ze stroną www.2b-lonowe.pl dokładniej do z podstronami. Przykładowo strona www.2b-lonowe.pl/galeria się wczyta a www.2b-lonowe.pl/ksiega już nie. Nie wiem o co chodzi, wywaliłem wszystkie wpisy i zostawiłem tylko ten od ksiegi ale i tak nic nie pomogło.
  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteRule ^index/$ index.php
  4. RewriteRule ^page_news/([0-9]+)/$ index.php?page_news=$1
  5. RewriteRule ^page_ksiega/([0-9]+)/$ index.php?page=page_ksiega&id=$1 [L]
  6. RewriteRule ^galeria/([0-9]+)/$ index.php?page=kat_gal&id=$1
  7. RewriteRule ^galeria/([0-9]+)/([0-9]+)/$ index.php?page=kat&id=$1&foto=$2
  8. RewriteRule ^galeria/([0-9]+)/page/([0-9]+)/$ index.php?page=kat_gal&id=$1&p=$2 [L]
  9. RewriteRule ^news/([0-9]+)/$ index.php?news=$1 [L]
  10. RewriteRule ^news/add/([0-9]+)/$ index.php?news_add=$1
  11. RewriteRule ^uczniowie/$ index.php?page=uczniowie
  12. RewriteRule ^galeria/$ index.php?page=galeria
  13. RewriteRule ^ucz/([0-9]+)/$ index.php?page=ucz&id=$1
  14. RewriteRule ^mail,send/$ index.php?page=mail_send
  15. RewriteRule ^mail/$ index.php?page=mail
  16. RewriteRule ^ksiega/$ index.php?page=ksiega
  17. RewriteRule ^new_user/$ index.php?page=new_user [L]
  18. RewriteRule ^samorzad$ index.php?page=samorzad [L]
  19. RewriteRule ^plan$ index.php?page=plan [L]
  20. RewriteRule ^buda$ index.php?page=buda [L]
  21. RewriteRule ^nauczyciele$ index.php?page=nauczyciele [L]
  22. RewriteRule ^sprawdziany$ index.php?page=sprawdziany [L]
  23. RewriteRule ^wycieczki$ index.php?page=wycieczki [L]
  24. RewriteRule ^download$ index.php?page=down [L]
  25. RewriteRule ^download/([0-9]+)$ index.php?page=down&id=$1 [L]
  26. RewriteRule ^join$ index.php?page=join [L]
  27. RewriteRule ^filmy$ index.php?page=filmy [L]
  28. RewriteRule ^film/([0-9]+)$ index.php?page=film&id=$1 [L]
  29. RewriteRule ^rejestracja_nowy$ index.php?page=rejestracja_nowy [L]
  30. RewriteRule ^login$ index.php?page=login [L]
  31. RewriteRule ^users_gallery$ index.php?page=users_gallery [L]
  32. RewriteRule ^logout$ index.php?page=logout [L]
  33. RewriteRule ^loginf$ index.php?page=loginf [L]
  34. RewriteRule ^fpass$ index.php?page=fpass [L]
  35. RewriteRule ^fpassw$ index.php?page=fpassw [L]
  36. RewriteRule ^zmiany$ index.php?page=zmiany [L]
  37. RewriteRule ^calendar$ index.php?page=calendar [L]
  38. RewriteRule ^user/([A-z]+)$ index.php?page=user&user=$1 [L]
  39. RewriteRule ^userpanel$ index.php?page=userpanel [L]
  40. RewriteRule ^userpanel/dane$ index.php?page=userpanel/dane [L]
  41. RewriteRule ^verify/([0-9]+)/([[A-z]+)/$ index.php?page=verify&uid=$1&token=$2 [L]
Go to the top of the page
+Quote Post
mandragorek
post
Post #2





Grupa: Zarejestrowani
Postów: 18
Pomógł: 2
Dołączył: 9.03.2007

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


Wyrzuć '/' z końcówek,np.
Kod
RewriteRule ^ksiega/$ index.php?page=ksiega

zamień na
Kod
RewriteRule ^ksiega$ index.php?page=ksiega
Go to the top of the page
+Quote Post
Lejto
post
Post #3





Grupa: Zarejestrowani
Postów: 1 385
Pomógł: 48
Dołączył: 23.05.2007

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


nic z tego, nie działa. Nie wiem czemu np. /galeria działa
problem ten pojawił się odkąd przeszedłem na serwer 1and1
Go to the top of the page
+Quote Post
posiadacz
post
Post #4





Grupa: Zarejestrowani
Postów: 46
Pomógł: 2
Dołączył: 2.04.2009

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


Możesz zastąpić większość swoich wpisów jednym

  1. RewriteRule ^(ksiega|nauczyciele|przedmioty|itd)$ index.php?page=$1


albo prościej dodając prefix


  1. RewriteRule ^informacje/([A-Za-z0-9\+\-\_\,]+)$ index.php?page=$1

Go to the top of the page
+Quote Post
Lejto
post
Post #5





Grupa: Zarejestrowani
Postów: 1 385
Pomógł: 48
Dołączył: 23.05.2007

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


ale jak wywaliłem wszystkie wpisy i zostawiłem tylko ten ze ksiega to tez nie działało

jak zrobie np. ksiegaa to działa nie wiem czemu, gdzie może być błąd?
Go to the top of the page
+Quote Post
mandragorek
post
Post #6





Grupa: Zarejestrowani
Postów: 18
Pomógł: 2
Dołączył: 9.03.2007

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


Pewnie masz włączone MultiViews a w tym samym katalogu plik księga.php, spróbuj dodać w .htaccess
Kod
Options -MultiViews

Go to the top of the page
+Quote Post
Lejto
post
Post #7





Grupa: Zarejestrowani
Postów: 1 385
Pomógł: 48
Dołączył: 23.05.2007

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


plik ksiega.php jest w tym samym katalogu
dostaje cos takiego teraz:
Multiple Choices
The document name you requested (/ksiega/) could not be found on this server. However, we found documents with names similar to the one you requested.

Available documents:

* /ksiega.php/ (common basename)

Please consider informing the owner of the referring page about the broken link.
Go to the top of the page
+Quote Post
mandragorek
post
Post #8





Grupa: Zarejestrowani
Postów: 18
Pomógł: 2
Dołączył: 9.03.2007

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


Ale widzę, że http://www.2b-lonowe.pl/ksiega już działa, więc spróbuj może coś takiego
Kod
RewriteRule ^ksiega(|/)$ index.php?page=ksiega

czyli wyrażenie regularne ma pasować do linków z końcówką "/" lub bez niej.
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: 22.08.2025 - 20:57