Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]htaccess nie przekierowuje prawidłowo
Forum PHP.pl > Forum > Przedszkole
csharnas
Witam mam dziwny problem postawiłem stronke na serwerze dedykowanym i mam problem z przekierowanie RewriteRule.

przykład

chce aby otworzyła mi sie strona moja-strona.pl/style

w pliku htacces mam taki wpis

  1. RewriteRule ^style$ /index.php?strona=style [L]


i zamiast strony otwiera mi sie plik który jest w katalogu głównym o nazwie style.css

pomoże mi ktoś to ogarnąć ?
Turson
Kod
RewriteRule ^style/$ index.php?strona=style [L]


Jak to nie zadziała to pokaż całość kodu, bo możliwe że inna reguła koliduje z tą.
csharnas
nadal ten sam błąd sad.gif dodam tylko że ten plik działał na zwykłym hostingu nie chce działać na serwerze dedykowanym

  1. RewriteEngine On
  2. RewriteCond %{HTTP_REFERER} !^$
  3. RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?test.cs-harnas.pl [NC]
  4.  
  5.  
  6.  
  7. RewriteRule ^home$ /index.php [L]
  8. RewriteRule ^serwery$ /index.php?strona=serwery [L]
  9. RewriteRule ^sieci$ /index.php?strona=sieci [L]
  10. RewriteRule ^faq$ /index.php?strona=faq [L]
  11. RewriteRule ^logowanie$ /index.php?strona=login [L]
  12. RewriteRule ^kontakt$ /index.php?strona=kontakt [L]
  13. RewriteRule ^statystyki$ /index.php?strona=statystyki [L]
  14. RewriteRule ^serwer:(.*) /index.php?strona=serwer&ip=$1 [L]
  15. RewriteRule ^siec:(.*) /index.php?strona=serwery&siec=$1 [L]
  16. RewriteRule ^rejestracja:(.*)$ /index.php?strona=rejestracja&id=$1 [L]
  17. RewriteRule ^boost$ /index.php?strona=reklama [L]
  18.  
  19.  
  20. RewriteRule (.*)dodaj_serwer$ /panel/index.php?strona=nowyserwer [L]
  21. RewriteRule (.*)moje_serwery$ /panel/index.php?strona=mojeserwery [L]
  22. RewriteRule (.*)dodaj_siec$ /panel/index.php?strona=nowasiec [L]
  23. RewriteRule (.*)moje_sieci$ /panel/index.php?strona=mojesieci [L]
  24. RewriteRule (.*)edytuj_haslo$ /panel/index.php?strona=haslo [L]
  25. RewriteRule (.*)reklama$ /panel/index.php?strona=kupreklame [L]
  26. RewriteRule (.*)program_partnerski$ /panel/index.php?strona=pp [L]
  27. RewriteRule (.*)logi$ /panel/index.php?strona=logi [L]
  28. RewriteRule (.*)przekaz$ /panel/index.php?strona=przelew [L]
  29. RewriteRule (.*)wiadomosci$ /panel/index.php?strona=wiadomosci [L]
  30. RewriteRule (.*)boost$ /panel/index.php?strona=master [L]
  31. RewriteRule (.*)doladuj$ /doladuj.php [L]
  32. RewriteRule (.*)doladuj=sms$ /doladuj.php?page=sms [L]
  33. RewriteRule (.*)doladuj=przelewem$ /doladuj.php?page=przelew [L]
  34.  
  35.  
  36.  
  37. RewriteCond %{REQUEST_FILENAME} !-f
  38. RewriteCond %{REQUEST_FILENAME} !-d
  39. RewriteRule . /index.php [L]



amii
Może przed dodaj reguły wykluczenia plików:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
csharnas
nadal ten sam błąd sad.gif

temat rozwiązany wystarczylo dodac Options FollowSymLinks
smile.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.