Merhaba, Ziyaretçi. Lütfen giriş yapın veya üye olun.
Aktivasyon mailiniz gelmediyse buraya tıklayın.
Mayıs 13, 2008, 07:48:03 pm
41812 Mesaj 9080 Konu Gönderen: 17479 Üye
Son üye: umit_cbn
Turk-Php.Com Forum  |  Yardım Forumları  |  Genel Yardım  |  .htaccess tricks « önceki sonraki »
Sayfa: [1] Yazdır
Yazan Konu: .htaccess tricks  (Okunma Sayısı 46 defa)
Caduceus
Yeni Kullanıcılar
*
Offline Offline

Mesaj Sayısı: 1


Üyelik Bilgileri
.htaccess tricks
« : Mayıs 09, 2008, 10:24:49 am »

Merhaba. Benim sorum .htaccess kodlarıyla ilgili.

Kod:
ErrorDocument 400 /index.php?errcode=400
ErrorDocument 401 /index.php?errcode=401
ErrorDocument 403 /index.php?errcode=403
ErrorDocument 404 /index.php?errcode=404
ErrorDocument 405 /index.php?errcode=405
ErrorDocument 408 /index.php?errcode=408
ErrorDocument 410 /index.php?errcode=410
ErrorDocument 411 /index.php?errcode=411
ErrorDocument 412 /index.php?errcode=412
ErrorDocument 413 /index.php?errcode=413
ErrorDocument 414 /index.php?errcode=414
ErrorDocument 415 /index.php?errcode=415
ErrorDocument 500 /index.php?errcode=500
ErrorDocument 501 /index.php?errcode=501
ErrorDocument 502 /index.php?errcode=502
ErrorDocument 503 /index.php?errcode=503

bu kullanım yerine biraz daha değişik birşey yapmak mümkün olurmu?
Mesela

Kod:
ErrorDocument ([0-9]{3}) /index.php?errcode=$1

gibi birşey? Örnek saçma oldu fakat ancak bu şekilde örnek verebiliyorum. Yapmak istediğim şey her hata numarası için ayrı bir satır yazmak yerine düzenli ifadelerden yararlanarak tüm hata kodları için tek bir satırlık kod kullanmak...
Logged
Sayfa: [1] Yazdır 
« önceki sonraki »
Gitmek istediğiniz yer: