Re: creating static links to documents

2007-04-16 Thread Cheeze

Hi,

You mentioned that you place the controllers in a sub-domain. Do you
mean something like this:

subdom.example.com/admin/userscontroller?

If not, can you provide an example?

On Apr 16, 2:13 am, jyrgen [EMAIL PROTECTED] wrote:
  I get missing controller errors

  AdminusersController should be Users Controller and so on...

 even though the problem described above has turned into another one,
 i need some help or instructions to get my cake URLs fixed. where to
 patch what ?

 Where does the derivation of controller names take place? It seems
 obvious that
 the subdomain string is taken into account here.

 thank you so much !

 jyrgen


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-16 Thread jyrgen

 You mentioned that you place the controllers in a sub-domain. Do you
 mean something like this:

 subdom.example.com/admin/userscontroller?

 If not, can you provide an example?

the subdomain points to the same directory as the main domain.
therefore the same controllers are used, except that the action
names are preceeded by Admin.

for more info, see this article in the bakery (where i also posted
my question)
http://bakery.cakephp.org/articles/view/56

i have opened a new thread for my problem here, because it
doesn't actually match subject any more...

http://groups.google.ch/group/cake-php/browse_thread/thread/9d1ebcc2d01d75c3/9370d56570cb5347

maybe your can answer there.

thanks a bunch, jyrgen




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-15 Thread jyrgen

 echo $html-link('File','http://host.com/files/quickguide.pdf');

no, i get a not found error. But the pdf is there.
jyrgen





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-15 Thread sumanpaul

ahh is your mod_rewrite enabled?

On Apr 15, 12:40 pm, jyrgen [EMAIL PROTECTED] wrote:
  echo $html-link('File','http://host.com/files/quickguide.pdf');

 no, i get a not found error. But the pdf is there.
 jyrgen


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-15 Thread jyrgen

On 15 Apr., 10:25, sumanpaul [EMAIL PROTECTED] wrote:
 ahh is your mod_rewrite enabled?

in apache conf yes. but i've commented out the .htaccess files.

is mod_rewrite neccessary for creating static links ??

cheers, jyrgen





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-15 Thread jyrgen

ok, after commenting out this line

define ('BASE_URL', env('SCRIPT_NAME'));

in core.php and activating mod_rewrite it works.

But now my admin area, which is located on a subdomain,
does not work anymore.

I get missing controller errors

AdminusersController should be Users Controller and so on...

see this thread:

http://groups.google.ch/group/cake-php/browse_thread/thread/ecddc4832edc3d6a/430b62f0e4b3b4e3

and this:

http://groups.google.ch/group/cake-php/browse_thread/thread/45a30f85c8ab163f/8ca32a8a5ecd3e00

thanks, jyrgen


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-15 Thread jyrgen

 I get missing controller errors

 AdminusersController should be Users Controller and so on...

even though the problem described above has turned into another one,
i need some help or instructions to get my cake URLs fixed. where to
patch what ?

Where does the derivation of controller names take place? It seems
obvious that
the subdomain string is taken into account here.

thank you so much !

jyrgen




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-14 Thread jyrgen

hi joshua !

thanks for you advice.

this is the resulting false link when i issue
a href=quickguide.pdf

http://localhost/cake/index.php/pages/quickguide.pdf

It doesn't work, because the link is relative.

Also i don't want to hardcode the absolute URL because i'm
on my local dev machine. The site will be placed online
(in the www root dir).

any more ideas ?

thanks, jyrgen



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-14 Thread Jon Bennett

 this is the resulting false link when i issue
 a href=quickguide.pdf

 http://localhost/cake/index.php/pages/quickguide.pdf

 It doesn't work, because the link is relative.

 Also i don't want to hardcode the absolute URL because i'm
 on my local dev machine. The site will be placed online
 (in the www root dir).

move your PDF into /app/webroot/files/ and use the cake html helper to
create the link, eg:

echo $html-link('quickguide.pdf', '/files/quickguide.pdf');

hth

jon

-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-14 Thread jyrgen

hi jon,

i tried what you suggested, but no success:

this is the resulting link:
http://localhost/cake/index.php/files/quickguide.pdf
(- error missing controller)

i guess it's supposed to be sth. like
http://localhost/cake/app/webroot/files/quickguide.pdf

is there anything wrong with my routing ?

jyrgen



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-14 Thread Jon Bennett

 i tried what you suggested, but no success:

 this is the resulting link:
 http://localhost/cake/index.php/files/quickguide.pdf
 (- error missing controller)

 i guess it's supposed to be sth. like
 http://localhost/cake/app/webroot/files/quickguide.pdf

 is there anything wrong with my routing ?

hmm, nope, it should work. If the file isn't there you will get a
missing controller error though, just like images that are missing.

what's your server setup? I'm not sure why you've got 'index.php' in the URL.

j

-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-14 Thread jyrgen

i've got index.php in *all* URLs... :-)
they all look like
http://localhost/cake/index.php/controller/action

don't quite know, what you mean with server setup.
directory structure is

/var/www/cake
/var/www/cake/cake
/var/www/cake/app
/var/www/cake/app/controller
/var/www/cake/app/views
...
/var/www/cake/docs

--

bootstrap.php:

...
if(env(HTTP_HOST) == admin.localhost){

$_GET[url] = admin . $_GET[url];

}

elseif(strpos($_GET[url], admin) === 0){

header (HTTP/1.0 404 Not Found);
die();
}
...

--

active routes are:

$Route-connect('/', array('controller' = 'users', 'action' =
'login'));
$Route-connect('/pages/*', array('controller' = 'pages', 'action' =
'display'));
$Route-connect ('/admin', array('controller' = 'users', 'action' =
'login', 'admin' = 1));

--

/var/www/cake/index.php:

define('APP_DIR', 'app');
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', dirname(__FILE__)); // this dir !
define('WEBROOT_DIR', 'webroot');
define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS); //
app-dir / webroot

--

/var/www/cake/app/index.php:

require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
(unchanged, like /var/www/cake/app/webroot/index.php)

--

best, jyrgen



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating static links to documents

2007-04-14 Thread savagekabbage

Does it work for you if you try something like:

echo $html-link('File','http://host.com/files/quickguide.pdf');


On Apr 14, 8:33 pm, jyrgen [EMAIL PROTECTED] wrote:
 i've got index.php in *all* URLs... :-)
 they all look likehttp://localhost/cake/index.php/controller/action

 don't quite know, what you mean with server setup.
 directory structure is

 /var/www/cake
 /var/www/cake/cake
 /var/www/cake/app
 /var/www/cake/app/controller
 /var/www/cake/app/views
 ...
 /var/www/cake/docs

 --

 bootstrap.php:

 ...
 if(env(HTTP_HOST) == admin.localhost){

 $_GET[url] = admin . $_GET[url];

 }

 elseif(strpos($_GET[url], admin) === 0){

 header (HTTP/1.0 404 Not Found);
 die();
 }
 ...

 --

 active routes are:

 $Route-connect('/', array('controller' = 'users', 'action' =
 'login'));
 $Route-connect('/pages/*', array('controller' = 'pages', 'action' =
 'display'));
 $Route-connect ('/admin', array('controller' = 'users', 'action' =
 'login', 'admin' = 1));

 --

 /var/www/cake/index.php:

 define('APP_DIR', 'app');
 define('DS', DIRECTORY_SEPARATOR);
 define('ROOT', dirname(__FILE__)); // this dir !
 define('WEBROOT_DIR', 'webroot');
 define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS); //
 app-dir / webroot

 --

 /var/www/cake/app/index.php:

 require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
 (unchanged, like /var/www/cake/app/webroot/index.php)

 --

 best, jyrgen


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---