Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: error 500 plik htaccess
Forum PHP.pl > Forum > Serwery WWW > Apache
Mastersieciweb
Witam, może mógłby ktoś mi pomóc, mam problem z pewną stronką którą skopiowałem z pewnego serwera gdzie tą stronke zrobiłem i działa, wszystkie pliki skopiowałem na serwer Apache zainstalowany na kompie XAMPP.
Serwer działa, sprawdzałem różne pliki php itp, ale ta stronka skopiowana do folderu htdocs wywala error 500:

C:/xampp/htdocs/public_html/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration

na forum gdzieś sprawdziłem, żeby usunąć # z:

httpd.conf usunąłem '#' LoadModule rewrite_module modules/mod_rewrite.so

i teraz nie wywala błędu ale w ogóle nic nie wyświetla. Ładuje się strona i nic nie wyświetla.
Plik htaccess wygląda tak:

  1.  
  2. RewriteEngine On
  3.  
  4. ExpiresActive On
  5. ExpiresDefault A0
  6. <FilesMatch "\.(xml|txt|html|js|css)$">
  7. ExpiresDefault A604800
  8. Header append Cache-Control "proxy-revalidate"
  9. </FilesMatch>
  10. <FilesMatch "\.(gif|jpg|jpeg|png|swf)$">
  11. ExpiresDefault A604800
  12. Header append Cache-Control "public"
  13. </FilesMatch>
  14.  
  15. ErrorDocument 404 /404.shtml
  16. ErrorDocument 400 /400.shtml
  17. ErrorDocument 401 /401.shtml
  18. ErrorDocument 403 /403.shtml
  19. ErrorDocument 500 /500.shtml
  20.  
  21. RewriteCond %{HTTP_HOST} !^www\. [NC]
  22. RewriteRule ^(.*)$ <a href="http://www.%{HTTP_HOST}/$1" target="_blank">http://www.%{HTTP_HOST}/$1</a> [R=301,L]
  23.  
  24. RewriteRule ^strona-glowna,1.html$ index.php?pageId=1 [L]
  25. RewriteRule ^blog,([0-9]+).html$ index.php?pageId=121&blog_id=$1 [L]
  26. RewriteRule ^oferty-widgety,([0-9]+).html$ widget.php?widgetName=Offer&action=getOffet&count=$1 [L]
  27. RewriteRule ^(.*),([0-9]+),([0-9]+).html$ index.php?pageId=$2&submenu=$3 [L]
  28. RewriteRule ^(.*),([0-9]+),panel.html$ cms/index.php?pageId=$2 [L]
  29. RewriteRule ^(.*),([0-9]+)(,p-[0-9]+).html$ index.php?pageId=$2&subPageId=$3
  30. RewriteRule ^(.*),3,([0-9]+).html$ index.php?pageId=3&newId=$2
  31. RewriteRule ^oferty,4,([0-9]+).html$ index.php?pageId=4&parentId=$1 [L]
  32. RewriteRule ^oferty,4,(.*).html$ index.php?pageId=4&offerTags=$1 [L]
  33. RewriteRule ^konkurs,(.*),([0-9]+).html$ index.php?pageId=102&contestId=$2 [L]
  34. RewriteRule ^oferta,(.*),([0-9]+).html$ index.php?pageId=5&offerId=$2
  35. RewriteRule ^(.*),8,([0-9]+),(.*).html$ index.php?pageId=8&galleryId=$2&name=$3
  36. RewriteRule ^lista-produktow,9,([0-9]+).html$ index.php?pageId=9&categoryId=$1
  37. RewriteRule ^produkty-polecane,22,([0-9]+).html$ index.php?pageId=22&categoryId=$1
  38. RewriteRule ^produkty-w-promocji,23,([0-9]+).html$ index.php?pageId=23&categoryId=$1
  39. RewriteRule ^(.*),10,([0-9]+).html$ index.php?pageId=10&productId=$2
  40. RewriteRule ^potwierdzenie-rejestracji,(.*).html$ index.php?pageId=16&key=$1 [L]
  41. RewriteRule ^szczegoly-zlozonego-zamowienia,21,([0-9]+).html$ index.php?pageId=21&orderId=$1 [L]
  42. RewriteRule ^autoryzacja-uzytkownika,([0-9]+),login.html$ index.php?pageId=$1&action=login [L]
  43. RewriteRule ^autoryzacja-uzytkownika,([0-9]+),logout.html$ index.php?pageId=$1&action=logout [L]
  44. RewriteRule ^usuniecie-rejestracji,(.*).html$ index.php?pageId=73&deleteRegistration=yes&key=$1 [L]
  45. RewriteRule ^dodaj-oferte,30,([0-9]+).html$ index.php?pageId=30&type=$1 [L]
  46. RewriteRule ^napisz-wiadomosc,32,([0-9]+).html$ index.php?pageId=32&userId=$1 [L]
  47. RewriteRule ^odpowiedz-wiadomosci,32,([0-9]+),([0-9]+).html$ index.php?pageId=32&userId=$1&messageId=$2 [L]
  48. RewriteRule ^zadaj-pytanie,32,([0-9]+),([0-9]+).html$ index.php?pageId=32&userId=$1&offerId=$2 [L]
  49. RewriteRule ^(.*),34,([0-9]+).html$ index.php?pageId=34&offerType=$2 [L]
  50. RewriteRule ^profil-uzytkownika,35,([0-9]+).html$ index.php?pageId=35&userId=$1 [L]
  51. RewriteRule ^poczta,36,([0-9]+).html$ index.php?pageId=36&list=$1 [L]
  52. RewriteRule ^szczegoly-wiadomosci,37,([0-9]+).html$ index.php?pageId=37&messageId=$1 [L]
  53. RewriteRule ^usun-wiadomosc,38,([0-9]+),1.html$ index.php?pageId=38&messageId=$1&message_type=1 [L]
  54. RewriteRule ^usun-wiadomosc,38,([0-9]+),2.html$ index.php?pageId=38&messageId=$1&message_type=2 [L]
  55. RewriteRule ^edycja-oferty,([0-9]+),([0-9]+).html$ index.php?pageId=$1&offerId=$2 [L]
  56. RewriteRule ^newsletter,(.*).html$ index.php?pageId=24&key=$1 [L]
  57. RewriteRule ^newsletter-usuwanie,(.*).html$ index.php?pageId=25&key=$1 [L]
  58. RewriteRule ^lista-propozycji,59,([0-9]+).html$ index.php?pageId=59&offerId=$1 [L]
  59. RewriteRule ^moje-platnosci,64,([0-9]+).html$ index.php?pageId=64&type=$1 [L]
  60. RewriteRule ^moje-platnosci,64,y([0-9]+),m([0-9]+).html$ index.php?pageId=64&year=$1&month=$2 [L]
  61. RewriteRule ^oplac-prowizje,79,y([0-9]+),m([0-9]+).html$ index.php?pageId=79&year=$1&month=$2 [L]
  62. RewriteRule ^(.*),([0-9]+).html$ index.php?pageId=$2 [L]
  63. RewriteRule ^inwestycja,(.*),([0-9]+),([0-9]+).html$ index.php?galleryId=$2&pageId=$3 [L]
  64.  
  65. RewriteRule ^transakcja-udana,(.*).html$ raport.php?id=$1&action=done [L]
  66. RewriteRule ^transakcja-nieudana,(.*).html$ raport.php?id=$1&action=error [L]
  67.  
  68.  
  69. <files cron.php>
  70. deny from all
  71. allow from 91.200.187.2, 91.200.187.3, 91.200.187.4, 91.200.187.5,91.200.187.6
  72. </files>
  73.  


ma może ktoś jakieś rady? Jestem całkowicie zielony:)
Pyton_000
Cytat
mam problem z pewną stronką którą skopiowałem z pewnego serwera gdzie tą stronke zrobiłem i działa,

to skopiowałeś i nie wiesz jak naprawić?

Raportowanie błędów włączone?
Mastersieciweb
nie wiem właśnie bo kodem na tej stronie się nie zajmowałem, chciałem sobie zmodyfikować u siebie na Apache tą stronkę i skopiowałem z serwera wszystkie pliki. Ten błąd znalazłem w Apache pliku logs/error.
SpiritCode
Sprawdź.
Według tego musisz mieć odblokowany moduł mod_expires
b4rt3kk
Co masz w error logu apacha?
Mastersieciweb
wywalało ten błąd:

C:/xampp/htdocs/public_html/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration

i w httpd.conf usunąłem '#' LoadModule rewrite_module modules/mod_rewrite.so

ale teraz nie pokazuje się błąd zaden ale też nic się nie wyświetla
Pyton_000
Wywal to:

ExpiresActive On
ExpiresDefault A0
Mastersieciweb
nadal pustą strone wyświetla
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-2024 Invision Power Services, Inc.