Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [htaccess] 500 Internal Server Error
pehaperowiec
post 8.02.2014, 15:51:41
Post #1





Grupa: Zarejestrowani
Postów: 91
Pomógł: 8
Dołączył: 26.09.2011

Ostrzeżenie: (10%)
X----


.htaccess wygląda tak:
Kod
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule .* - [L]
RewriteRule ^index.html$ index.php
RewriteRule ^galeria,(.*?)$ pokaz_galerie.php?name=$1 [L]
RewriteRule ^([^-]*)$ index.php?p=$1 [L]
a linki generuje do takiej postaci:
  1. <a href="/galeria,dfg"><img src="gal/dfg/thumbs/df.jpg" alt=""><span>dfg</span></a></p></li><li><p>
  2. <a href="/galeria,2"><img src="gal/2/thumbs/9.jpg" alt=""><span>2</span></a></p></li>

ale jako zwrot dostaje: "Internal Server Error".

Czy mógłbym prosić o wskazanie błędu i napisanie co robię źle?
Powód edycji: [Kshyhoo]: używaj odpowiedniego bb-code
Go to the top of the page
+Quote Post
Turson
post 8.02.2014, 16:07:00
Post #2





Grupa: Zarejestrowani
Postów: 4 291
Pomógł: 829
Dołączył: 14.02.2009
Skąd: łódź

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


(.*?) usuń ten znak zapytania
Go to the top of the page
+Quote Post
pehaperowiec
post 9.02.2014, 10:39:49
Post #3





Grupa: Zarejestrowani
Postów: 91
Pomógł: 8
Dołączył: 26.09.2011

Ostrzeżenie: (10%)
X----


dalej jest to samo

ma ktoś jakiś pomysł na to?
Go to the top of the page
+Quote Post
Turson
post 9.02.2014, 13:08:02
Post #4





Grupa: Zarejestrowani
Postów: 4 291
Pomógł: 829
Dołączył: 14.02.2009
Skąd: łódź

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


Wrzuć w htaccess tylko to
Kod
RewriteEngine On
RewriteRule ^galeria,(.*)$ pokaz_galerie.php?name=$1 [NC]

jeżeli link wejdzie - inna reguła powoduje błąd. Metoda prób i błędów
Go to the top of the page
+Quote Post
pehaperowiec
post 9.02.2014, 13:59:42
Post #5





Grupa: Zarejestrowani
Postów: 91
Pomógł: 8
Dołączył: 26.09.2011

Ostrzeżenie: (10%)
X----


Teraz nie zamienia adresów tylko link pozostaje w postaci adres.pl/pokaz_galerie.php?name=Biszkopt
Go to the top of the page
+Quote Post
Turson
post 9.02.2014, 14:07:22
Post #6





Grupa: Zarejestrowani
Postów: 4 291
Pomógł: 829
Dołączył: 14.02.2009
Skąd: łódź

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


Przecież to nie ma zmieniać adresów. Wpisz adres.pl/galeria,Biszkopt
Go to the top of the page
+Quote Post
pehaperowiec
post 9.02.2014, 14:35:33
Post #7





Grupa: Zarejestrowani
Postów: 91
Pomógł: 8
Dołączył: 26.09.2011

Ostrzeżenie: (10%)
X----


Internal Server Error
Go to the top of the page
+Quote Post
PerfectM
post 9.02.2014, 14:45:54
Post #8





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 9.02.2014

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


Jesteś pewny że twój serwer obsługuje htaccess?
Go to the top of the page
+Quote Post
pehaperowiec
post 9.02.2014, 14:47:53
Post #9





Grupa: Zarejestrowani
Postów: 91
Pomógł: 8
Dołączył: 26.09.2011

Ostrzeżenie: (10%)
X----


tak, jest to hosting personal z ovh.pl (płatny)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 25.06.2025 - 11:28