Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Błąd 500, a plik .htaccess
Mega_88
post
Post #1





Grupa: Zarejestrowani
Postów: 360
Pomógł: 34
Dołączył: 20.08.2011

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


Cześć Wam !

Mam problem z plikiem .htaccess ,a bardziej z tym plikiem umieszczonym na serwerach cba.pl .Ponieważ na innym serwerze na którym do tej pory była strona wszystko było dobrze. Natomiast po przeniesieniu strony na serwer cba.pl dostaje na wstępie Błąd 500. Na 100% jest to problem w tym pliku ponieważ po usunięciu go z serwera strona zaczyna działać. Jednak plik .htaccess jest mi oczywiście potrzebny do funkcjonowania strony. Umie go ktoś poprawnie sformatować, żeby działał mi na serwerze cba ? Bo kombinowałem na różne sposoby, ale to jest ponad moje siły...

Serwer niby ma problem z "Options +FollowSymLinks", ale po usunięciu tej linni nad jest błąd. Też coś niby jest z "RewriteRule", ale nie wiem jak to poprawnie sformatować. Pomoże mi ktoś z tym, i pokaże jak ma wyglądać ten plik ?

Plik wygłąda tak, nie jest długi:

Cytat
php_flag display_errors off
Options +FollowSymLinks
RewriteEngine On
RewriteBase /

<files "password.txt">
order allow,deny
deny from all
</files>

RewriteRule edycja$ index-cms.php

RewriteRule o-firmie$ index.php?id=1
RewriteRule serwis-o$ index.php?id=2
RewriteRule serwis-c$ index.php?id=3
RewriteRule kontakt$ index.php?id=4
RewriteRule kontakt-s$ index.php?id=5
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
wizu
post
Post #2





Grupa: Zarejestrowani
Postów: 127
Pomógł: 15
Dołączył: 16.02.2008
Skąd: Sanok

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


Masz na pewno włączony mod_rewrite?
  1. php_flag display_errors off
  2. <files "password.txt">
  3. order allow,deny
  4. deny from all
  5. </files>
  6.  
  7. <IfModule mod_rewrite.c>
  8. Options +FollowSymLinks
  9. RewriteEngine On
  10.  
  11. RewriteRule edycja$ index-cms.php
  12. RewriteRule o-firmie$ index.php?id=1
  13. RewriteRule serwis-o$ index.php?id=2
  14. RewriteRule serwis-c$ index.php?id=3
  15. RewriteRule kontakt$ index.php?id=4
  16. RewriteRule kontakt-s$ index.php?id=5
  17. </IfModule>
Go to the top of the page
+Quote Post
Mega_88
post
Post #3





Grupa: Zarejestrowani
Postów: 360
Pomógł: 34
Dołączył: 20.08.2011

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


Jeżeli wytnę z kodu to:

  1. php_flag display_errors off
  2. Options +FollowSymLinks


Strona zaczyna działać, ale nie działają zakładki, a co z tym fantem ? Kod wygląda teraz tak:

  1. RewriteEngine On
  2. RewriteBase /
  3.  
  4. <files "password.txt">
  5. order allow,deny
  6. deny from all
  7. </files>
  8.  
  9. RewriteRule edycja$ index-cms.php
  10.  
  11. RewriteRule o-firmie$ index.php?id=1
  12. RewriteRule serwis-o$ index.php?id=2
  13. RewriteRule serwis-c$ index.php?id=3
  14. RewriteRule kontakt$ index.php?id=4
  15. RewriteRule kontakt-s$ index.php?id=5


Działa (IMG:style_emoticons/default/arrowheadsmiley.png) Wspólnymi siłami wizu i się udało. Poprawie powinno wyglądać to tak:

  1. RewriteEngine On
  2. RewriteBase /
  3.  
  4. <files "password.txt">
  5. order allow,deny
  6. deny from all
  7. </files>
  8.  
  9. <IfModule mod_rewrite.c>
  10. RewriteRule edycja$ index-cms.php
  11.  
  12. RewriteRule o-firmie$ index.php?id=1
  13. RewriteRule serwis-o$ index.php?id=2
  14. RewriteRule serwis-c$ index.php?id=3
  15. RewriteRule kontakt$ index.php?id=4
  16. RewriteRule kontakt-s$ index.php?id=5
  17. </IfModule>
  18.  
Go to the top of the page
+Quote Post
wizu
post
Post #4





Grupa: Zarejestrowani
Postów: 127
Pomógł: 15
Dołączył: 16.02.2008
Skąd: Sanok

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


Moje ifmodule, jest zwykłym ifem sprawdzającym czy moduł został wczytany. Moja odpowiedź nic ci nie pomogła (IMG:style_emoticons/default/wink.gif)
Po prostu nie masz opcji php_flag na serwerze.
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: 18.09.2025 - 23:09