Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CakePHP] Adres url, Adres bez "app/webroot"
kacperix
post
Post #1





Grupa: Zarejestrowani
Postów: 37
Pomógł: 0
Dołączył: 30.07.2006
Skąd: okolice Elbląga

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


Witam.

Mój kolejny problem polega na tym, że gdy w kodzie strony używam przekierowania wbudowane w CakePHP, tzn.:

Kod
$this->redirect('w tym miejscu adres');


To w przypadku gdy chce przekierować stronę do adresu, np. http://jakasdomena.pl/users/login to adres ten jest zamieniany do postaci: http://jakasdomena.pl/app/webroot/users/login

Czy istnieje mozliwość aby adresy url nie zawierały "app/webroot" (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

Pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
MiB
post
Post #2





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 30.08.2006
Skąd: Kraków

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


Hmm...

  1. <?php
  2. /**
  3.  * If you do not have mod rewrite on your system
  4.  * or if you prefer to use CakePHP pretty urls.
  5.  * uncomment the line below.
  6.  * Note: If you do have mod rewrite but prefer the
  7.  * CakePHP pretty urls, you also have to remove the
  8.  * .htaccess files
  9.  * release/.htaccess
  10.  * release/app/.htaccess
  11.  * release/app/webroot/.htaccess
  12.  */
  13. // define ('BASE_URL', env('SCRIPT_NAME'));
  14. ?>


Może nie masz mod_rewrite`a? (najlepiej odkomentuj i sprawdź jak działa strona z tym).

Pozdrawiam
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 - 09:03