• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Htaccess

Blizny

New Member
Joined
Jun 26, 2012
Messages
107
Reaction score
2
Location
Poland / Bydgoszcz
witam mam pytanie jak w moge zrobić taki modzik w HTACCESS żeby przekierowywał na strone główną... np hujemujedomena.pl jesli wpisze w url przykladowo hujemujedomena.pl/konto a << nie ma czegos takiego jak konto chcialbym zeby przekierowalo na strone glowna za kazdym razem kiedy wpisze cos co nie jest submenu chyba tak dobrze to nazwalem bo jak tak wpisuje to wyswietla mi sie blad

Not Found

The requested URL /l was not found on this server.


Przykładowo podam hexana.net wpiszcie np hexana.net/jansdjhasdhas i ok :P o cos takiego mi chodzi :) dziękuje
 
to przekierowuj 404 na główną, chyba najłatwiej będzie
i to rewrite chyba nawet nie wymaga(?)
 
Twój przykład działa tylko z Apache, dam dla Lighttpd dodatkowo:

Code:
server.error-handler-404 = "/var/www/index.php"
 
A ja dam przykład na nginx:
Code:
  server{
      listen 80;
      server_name .example.com;
      location / {
           proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header Host $http_host;
           proxy_redirect false;
           proxy_pass http://127.0.0.1:9002;
      }
      error_page 500 502 503 504  /500.html;
      location = /500.html {
          root  /var/www/maintenance/example;
      }
  }
 
Back
Top