Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Kohana] The requested URL / was not found on this server.
pifarek
post
Post #1





Grupa: Zarejestrowani
Postów: 91
Pomógł: 15
Dołączył: 3.03.2009
Skąd: Włocławek

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


Witam.
Mam serwer na linuxpl.com, wgrałem tam aplikację na Kohana 3.3, ustawiłem .htaccess i bootstrap.php, do serwera jest podpięta domenta. Po wpisaniu adresu w przeglądarkę pokazuje się błąd Kohany: "The requested URL / was not found on this server.".
bootstrap.php:
  1. Kohana::init(array(
  2. 'base_url' => '/',
  3. 'index_file' => false
  4. ));

.htaccess:
  1. # Turn on URL rewriting
  2. RewriteEngine On
  3.  
  4. # Installation directory
  5. RewriteBase /
  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]


Na hostingu jest podpięta jeszcze inna domena, na której działa Kohana w jakiejś starszej wersji z gałęzi 3.x, bootstrap i htaccess są ustawione tak samo, jak powyżej. W czym może być problem?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
pifarek
post
Post #2





Grupa: Zarejestrowani
Postów: 91
Pomógł: 15
Dołączył: 3.03.2009
Skąd: Włocławek

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


u mnie to wygląda tak:
  1. Route::set('default', '(<action>)')
  2. ->defaults(array(
  3. 'controller' => 'index',
  4. 'action' => 'index',
  5. ));
  6.  
  7. Route::set('admin', 'admin/<action>')
  8. ->defaults(array(
  9. 'directory' => 'admin',
  10. 'controller' => 'index'
  11. ));
  12.  
  13. Route::set('feed', 'feed/<action>')
  14. ->defaults(array(
  15. 'directory' => 'feed',
  16. 'controller' => 'index',
  17. 'action' => 'index',
  18. ));
  19.  
  20. Route::set('news', 'news/<news>(/<action>)')
  21. ->defaults(array(
  22. 'directory' => 'news',
  23. 'controller' => 'index',
  24. 'action' => 'index',
  25. ));
  26.  
  27. Route::set('user', 'user/<username>(/<action>)')
  28. ->defaults(array(
  29. 'directory' => 'user',
  30. 'controller' => 'index',
  31. 'action' => 'index',
  32. ));
  33.  
  34. Route::set('user_ajax', 'user/ajax/<action>')
  35. ->defaults(array(
  36. 'directory' => 'user',
  37. 'controller' => 'ajax',
  38. 'action' => 'index',
  39. ));
  40.  
  41. Route::set('game', 'game/<game>(/<tab>)', array('tab' => 'play|report'))
  42. ->defaults(array(
  43. 'directory' => 'game',
  44. 'controller' => 'index',
  45. 'action' => 'index',
  46. ));
  47.  
  48. Route::set('game_ajax', 'game/ajax/<action>')
  49. ->defaults(array(
  50. 'directory' => 'game',
  51. 'controller' => 'ajax',
  52. 'action' => 'index',
  53. ));
  54.  
  55. Route::set('activate', 'activate,user.<username>,code.<code>')
  56. ->defaults(array(
  57. 'controller' => 'index',
  58. 'action' => 'activate',
  59. ));
  60.  
  61. Route::set('ajax', 'ajax/<action>')
  62. ->defaults(array(
  63. 'controller' => 'ajax',
  64. 'action' => 'index',
  65. ));

i wszystko działa na localhoscie :/
Go to the top of the page
+Quote Post

Posty w temacie


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: 4.10.2025 - 18:00