Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [Kohana] .htaccess
Forum PHP.pl > Forum > PHP > Frameworki
piotrtt
Witam ,

struktura linków wygląda teraz :domena/index.php/costam , wiem że powinienem usunąć index.php żeby skórcić adresy ale narazie unikam setek przekierowań itp.
Po wejściu na domena/index.php/podstronaktóranieistnieje wychodzi błąd 404 , jednak googiel poindeksował mi parę podston : domena/podstronaktóranieistnieje czyli bez index.php , po wejściu na taką pustą podstroną wywala komunikat : no input file specified.
Jaki wpis zastosować do .htaccess zeby po wejściu na taką podstronę bez index.php pojawiła się strona noacces.
Mój plik .htaccess , wycinek :

CODE
# Rewrite to index.php/access_denied/URL
RewriteRule ^(.*)$ index.php/page/noaccess [PT,L]

# Do not enable rewriting for other files that exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]


Z góry dziękuję za pomoc.

Pozdr
Kedan
Ja mam tak:
  1. # Turn on URL rewriting
  2. RewriteEngine On
  3.  
  4. # Installation directory
  5. RewriteBase /katalog-strony/
  6.  
  7. # Protect hidden files from being viewed
  8. <Files .*>
  9. Order Deny,Allow
  10. Deny From All
  11. </Files>
  12.  
  13. # Protect application and system files from being viewed
  14. RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
  15.  
  16. # Allow any files or directories that exist to be displayed directly
  17. RewriteCond %{REQUEST_FILENAME} !-f
  18. RewriteCond %{REQUEST_FILENAME} !-d
  19.  
  20. # Rewrite all other URLs to index.php/URL
  21. RewriteRule .* index.php/$0 [PT]


Poza tym sprawdź czy masz dobrze skonfigurowany plik bootsrap.php
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.