Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Nie dziala mod_rewrite na localhost Win 7
Forum PHP.pl > Forum > Serwery WWW
kasior
hej. testuje już 3 serwer. Był WebServ, był Xampp, jest teraz Wamp i wszedzie to samo.
Moduł mod_rewrite włączony, poustawiane gdzie mozna AllowOverride All, Allow from all,
zrobiony virtualhost, strona się otwiera jednakże jak tylko pojawia sie RewriteEngine On
to mam błąd 404.

Czy to dotyczy może win7 czy jeszcze coś innego? Na winXP nie mialem nigdy takich problemów i wszystko działalo.
ma ktoś jakis pomysł jeszcze?

mar1aczi
Tak, patrzyłeś "co mówiły logi" od apache.
kasior
Juz jestem. Logi mówia,że:

[error] [client 127.0.0.1] File does not exist: C:/WebServ/httpd-users/cms/pl,9,Kontakt.html, referer: http://localhost/~cms/

Poniżej mój htaccess. Wiem,ze nie wygląda fajnie, ale działa na normalnych serwerach www bezproblemowo. Wiem,wiem.. chcę to wszystko przerobic dlatego instalacja cms-a na localhoście,żeby w spokoju sobie system przerabiać.


  1. <IfModule mod_rewrite.o>
  2.  
  3. RewriteEngine On
  4. #RewriteCond %{HTTP_HOST} !^www\.
  5. #RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
  6. RewriteBase /
  7.  
  8. RewriteCond %{REQUEST_URI} \.(tpl|tpl.php)$
  9.  
  10.  
  11. RewriteCond %{REQUEST_FILENAME} !-f
  12.  
  13.  
  14. RewriteRule ^([^-/,]+),akt-([0-9]+),([0-9]+).html$ index.php?action=strona&id=akt-$2&lang=$1&idnews=$3 [L]
  15. RewriteRule ^([^-/,]+),akt-([0-9]+),([0-9]+),([^/,]+).html$ index.php?action=strona&id=akt-$2&lang=$1&idnews=$3&name=$4 [L]
  16. RewriteRule ^([^-/,]+),gal-([0-9]+),([0-9]+).html$ index.php?action=strona&id=gal-$2&lang=$1&idnews=$3 [L]
  17. RewriteRule ^([^-/,]+),gal-([0-9]+),([0-9]+),([^/,]+).html$ index.php?action=strona&id=gal-$2&lang=$1&idnews=$3&name=$4 [L]
  18. RewriteRule ^([^-/,]+),shop-([0-9]+),([0-9]+).html$ index.php?action=strona&id=shop-$2&lang=$1&idnews=$3 [L]
  19. RewriteRule ^([^-/,]+),shop-([0-9]+),([0-9]+),([^/,]+).html$ index.php?action=strona&id=shop-$2&lang=$1&idnews=$3&name=$4 [L]
  20.  
  21.  
  22. RewriteRule ^([^-/,]+),zdjecia,([0-9]+).html$ index.php?action=strona&id=zdjecia&ida=$2&lang=$1 [L]
  23. RewriteRule ^([^-/,]+),zdjecia,([0-9]+),([^/,]+).html$ index.php?action=strona&id=zdjecia&ida=$2&lang=$1&name=$3 [L]
  24. RewriteRule ^([^-/,]+),zdjecia,([0-9]+)-([0-9]+).html$ index.php?action=strona&id=zdjecia&ida=$2-$3&lang=$1 [L]
  25. RewriteRule ^([^-/,]+),zdjecia,([0-9]+)-([0-9]+),([^/,]+).html$ index.php?action=strona&id=zdjecia&ida=$2-$3&lang=$1&name=$4 [L]
  26.  
  27.  
  28. RewriteRule ^([^-/,]+),akt-([0-9]+)-([0-9]+).html$ index.php?action=strona&id=akt-$2-$3&lang=$1 [L]
  29. RewriteRule ^([^-/,]+),akt-([0-9]+)-([0-9]+),([^/,]+).html$ index.php?action=strona&id=akt-$2-$3&lang=$1&name=$4 [L]
  30. RewriteRule ^([^-/,]+),akt-([0-9]+),([^/,]+).html$ index.php?action=strona&id=akt-$2&lang=$1&name=$3 [L]
  31.  
  32. RewriteRule ^([^-/,]+),gal-([0-9]+)-([0-9]+).html$ index.php?action=strona&id=gal-$2-$3&lang=$1 [L]
  33. RewriteRule ^([^-/,]+),gal-([0-9]+)-([0-9]+),([^/,]+).html$ index.php?action=strona&id=gal-$2-$3&lang=$1&name=$4 [L]
  34. RewriteRule ^([^-/,]+),gal-([0-9]+),([^/,]+).html$ index.php?action=strona&id=gal-$2&lang=$1&name=$3 [L]
  35.  
  36. RewriteRule ^([^-/,]+),shop-([0-9]+)-([0-9]+).html$ index.php?action=strona&id=shop-$2-$3&lang=$1 [L]
  37. RewriteRule ^([^-/,]+),shop-([0-9]+)-([0-9]+),([^/,]+).html$ index.php?action=strona&id=shop-$2-$3&lang=$1&name=$4 [L]
  38. RewriteRule ^([^-/,]+),shop-([0-9]+),([^/,]+).html$ index.php?action=strona&id=shop-$2&lang=$1&name=$3 [L]
  39.  
  40.  
  41. RewriteRule ^([^-/,]+),([^-/,]+).html$ index.php?action=strona&id=$2&lang=$1 [L,NC,NS]
  42. RewriteRule ^([^-/,]+),([^-/,]+),([^/,]+).html$ index.php?action=strona&id=$2&lang=$1&code=$3 [L,NC,NS]
  43.  
  44.  
  45. </IfModule>
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.