SES Simple Question

Hello All,
Im trying to implement the SES URL mechanism, and I must not be
getting something correct. All Im trying to do is implement it on the
default handler/method that comes right out of the box
(event=general.dspHome). Ive got setUniqueURLs set to true Ive got
setBaseURL set to http://localhost/testColdboxApp and just the default
courses set, and everytime I request "http://localhost/
testColdboxApp/" it redirects to "http://localhost/testColdboxApp/
general" then gives me a 404 Not Found...

So I guess my questions would be, do I need to setup in my routes
config a course for every event I'm creating?? What am I missing here?
I'm not sure if Apache's DirectoryIndex module has anything to do with
it, but I've tried with and without...

WS: Apache 2.2.6
WAP: CF8

Hi Sal,

A few questions first.

- Are you using mod_rewrite ? or Are you relying on the /index.cfm/
handler/action approach?

I would suggest turning unique url's off for now, so you can test.
Also, for the base URL, if you are not using a mod rewrite or isapi
rewrite, you should include the index.cfm.
Example:

My full path to my index:
setBaseURL(‘http://localhost/testApp/index.cfm’)

This will be used to create routes like:
http://localhost/testApp/index.cfm/general/dspHome

If you are using mod_rewrite, then do not append the index.cfm to the
baseURL.
setBaseURL(‘http://localhost/testApp’)

Then the routes will be:
http://localhost/testApp/general/dspHome

Try that and let me know. If you use mod_rewrite, you need to allow
for directory overrides and .htaccess, that's more of a mod_rewrite
thing than a coldbox thing.

Luis,

Yes I am using mod-rewrite via .htaccess, although all I did was copy
and paste the following into my .htaccess file that is located at the
root of my application (not web root).

RewriteEngine on

RewriteRule ^$ index.cfm [QSA]
RewriteRule ^([^.]+)$ $1.htm [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.cfm/%{REQUEST_URI} [QSA,L]

Is there anything else I would need to add to my .htaccess file for
this...? Also another "if-y" thing I did was I just straight
downloaded the routes config file as well as the system folder via svn
I did not download anything else (related to the framework). Would
this cause problems? So essentially I just added the routes to the
config directory and replaced the whole system directory...

What do you mean by "allow for directory overrides"? Is this something
in my .htaccess file, or in my httpd.conf file?

thanks much.
sal

What you have is exactly what I have. Just make sure that your virtual host can read the .htaccess file, via the
AllowOverride All
Directive.

I recommend you download the nightly build, it is pre-packaged for usage. Also, the basic routes.cfm is what you need for it work.

Luis

Sorry Sal, didn’t see the other stuff:

What do you mean by “allow for directory overrides”? Is this something
in my .htaccess file, or in my httpd.conf file?

Yes, the httpd.conf file. Here is mine:
<Directory “C:\Inetpub\wwwroot”>
Options Indexes FollowSymLinks
Order allow,deny
AllowOverride All
Allow from all

Then I use the .htaccess file provided, with the baseUrl to like: http://localhost/testApp
Then it should work

Hi Sal,

could you re-post your last message… due to some weird problem the message disappeared from posts list.

Regards
Sana

ahh weak. :slight_smile:

So here is my directive:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

So pretty much I would just need to change my AllowOverride None to
AllowOveride All...?

what does this do...?

did you recieve my re-post....?

That tells apache to allow for .htaccess files to be used. If you don’t have that, then you can’t use .htaccess files.

mmh right on! so then I suppose that's why it's acting quirky on the
rewrite, so I wonder if I put the baseURL like so:

My full path to my index:
setBaseURL(‘http://localhost/testApp/index.cfm’)

if it would work, because then essentially I wouldn't be leveraging
the web server rather than...

oops sorry typing outloud!! hey thanks Luis I'll give it shot later...
Looking forward to your preso here in a few!

thanks much
sal