Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> htaccess - problem
milk
post
Post #1





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 25.08.2010

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


Hello!

Poniżej wklejam do wglądu kawałek mojego htaccess`a.
Problemem są liniki ErrorDocument..

W tym momencie wszystko działa - lecz jak się zapewne domyslacie, w momencie kiedy
cały projekt zostaje wrzucony na inny serwer itp itp muszę zmieniać wszystkie wpisy dotyczące ErrorDocument.

Czy macie może jakiś pomysł jak rozwiązać ten problem?

Chodzi mi o to, aby każdy błąd 400,401,403,404.... był przekierowany na: RewriteRule ^error/([0-9]+)(/|/index\.html)?$ modules/error.php?id=$1

Proszę o pomoc!


Options FollowSymLinks
RewriteEngine On

ErrorDocument 400 http://127.0.0.1/test/error/400/index.html
ErrorDocument 401 http://127.0.0.1/test/error/401/index.html
ErrorDocument 403 http://127.0.0.1/test/error/403/index.html
ErrorDocument 404 http://127.0.0.1/test/error/404/index.html
ErrorDocument 405 http://127.0.0.1/test/error/405/index.html
ErrorDocument 406 http://127.0.0.1/test/error/406/index.html
ErrorDocument 408 http://127.0.0.1/test/error/408/index.html
ErrorDocument 410 http://127.0.0.1/test/error/410/index.html
ErrorDocument 411 http://127.0.0.1/test/error/411/index.html
ErrorDocument 414 http://127.0.0.1/test/error/414/index.html
ErrorDocument 500 http://127.0.0.1/test/error/500/index.html
ErrorDocument 503 http://127.0.0.1/test/error/503/index.html


#BŁĘDY
RewriteRule ^error/([0-9]+)(/|/index\.html)?$ modules/error.php?id=$1

#GŁÓWNA (index)
RewriteRule ^(/|index\.html)?$ modules/index.php
Go to the top of the page
+Quote Post

Posty w temacie
- milk   htaccess - problem   11.09.2010, 21:24:35
- - tr@k   ErrorDocument 400 /test/error/400/index.html Error...   13.09.2010, 20:37:50
- - milk   to rozwiazanie nie jest idealne.. test ->nazw...   13.09.2010, 22:14:52


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: 21.09.2025 - 02:50