I'm re-coding a site to work without mod_rewrite, and have come across
one problem:
I need to use absolute URLs because the generated code is going into
HTML emails, and I've been using $html->url('/',true) to generate an
absolute URL to the base of the site, and then appending image names
which are stored in the /files/uploaded_images/ folder.
But now I've disabled mod_rewrite, the base url always ends in /
index.php/ which is desirable for controller names etc,but not good
for generating links to files and images, because the links get
interpreted as controller names. I assume it works OK when mod_rewrite
is in place because there's a .htaccess rewrite rule that checks if
the file is real or not. Without the rewrite rule is there any other
check?
I don't want to hard code the site base because I have various
development and production servers so it will change.
Should I not use $html->url ? It would make sense if the dispatcher
checked if the url starts with /files/, /css/, or /js/ before
interpreting it - doesn't it do this somewhere?
Thanks
Jamie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---