Creare pagini de erori customizate

Started by -=[Vyorel]=-, Jun 21, 2011, 02:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pentru inceput va trebui sa va creati un fisier .htaccess in radacina site-ului sau in folderul in care doriti ca .htaccess sa actioneze. Tineti minte ca regulile din .htaccess sunt recursive, adica sunt active si in subfoldere.

Trebuie sa stiti ca sunt mai multe tipuri de erori pe care le puteti controla. Mai jos gasiti o lista cu toate erorile.

Quote100 Continue
101 Switching Protocols
102 Processing
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
207 Multi-Status
226 IM Used
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
306 Switch Proxy
307 Temporary Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity Too Large
414 Request-URI Too Long
415 Unsupported Media Type
416 Requested Range Not Satisfiable
417 Expectation Failed
418 I'm a teapot
422 Unprocessable Entity
423 Locked
424 Failed Dependency
425 Unordered Collection
426 Upgrade Required
449 Retry With
500 Internal Server Error501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported
506 Variant Also Negotiates
507 Insufficient Storage
509 Bandwidth Limit Exceeded
510 Not Extended

Acum ca stim fiecare ce erorare este, cum putem sa le folosim ?

In fisierul .htaccess creat anterior introduceti ceva asemanator cu exemplul de mai jos:
Quote#Pagina customizata pentru eroare 404
ErrorDocument 404 http://www.xerom-zone.com/404.html

Puteti folosi oricare din erorile de mai sus, important este sa nu uitati sa specificati calea catre fisierul unde va redirectiona vizitatorul cand va intalni aceasta erorare.

De exemplu, vizitati acest link eroare 404. Toate erorile de acest gen vor fi redirectionate catre pagina respectiva.

Sursa: ajutor.net

Jun 22, 2011, 06:10 PM #1 Last Edit: Jun 22, 2011, 06:15 PM by [SRC]stuntman
Foarte tare, am reusit si eu sa fac asta, dar am de lucrat la design acum ;))

EDIT: Gata si ala :))

Foarte tare.Poti face majoritatea erorilor din cpanel cel de la web host.
Pune un link/poza stuntman xD

Quote from: Mihai Marius on Jun 22, 2011, 10:46 PM
Pune un link/poza stuntman xD
Intra pe forumul lui (e jos la parteneri) si apoi pune un link gresit si te redirectioneaza automat.

Quote from: Mihai Marius on Jun 22, 2011, 10:46 PM
Foarte tare.Poti face majoritatea erorilor din cpanel cel de la web host.
Pune un link/poza stuntman xD

Fa si un cont si fa si cateva posturi :))


tare dar nam nevoie :| =D>
INSTALING NEW WINDOWS...
[glow=black,2,300]
██ 39%
███ 49%
████ 76%
█████ 89%
██████ 100%[/glow]

WAIT TO FINISH......
[glow=black,2,300]
██████████████]99%
█████████████]98%
████████████]97%
███████████]96%
██████████]95%[/glow]


PC sucks..Will explode in 3 min..
[๏̯͡๏]FUCK...[๏̯๏]


ΚΛβØⓄ/\/\  ε[-ิิ_�ิ]з