Trailing Slash URI madness

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Trailing Slash URI madness

MikeK-2

I've read a zillion posts about trailing slash and am not sure what my
deal is.

I have a php hello world app in webroot/x named index.php

It is a standard cake install where app and cake dirs are in
public_html

If I browse to www.mydomain.com/x/ everything looks fine and it
invokes the code in folder x file index.php - all URL is http://www.mydomain.com/x/
in the browser - notice the trailing slash is present.

HOWEVER If I browse to www.mydomain.com/x WITHOUT the trailing slash
my URLS switch to just http://mydomain.com/x/ in the browser although
the code runs fine.

Any idea why I am seeing this behavior? It's definitely the cake
router or dispatcher doing something I'm not understanding. .htaccess
has the standard stuff that come in the distribution.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Trailing Slash URI madness

MikeK-2

This coming and going of the www. is causing me major headaches in
some cookie code with other modules I have bridged to my app.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Trailing Slash URI madness

MikeK-2

One more piece of info. When I do not use the trailing slash the URL
is set to
http://mydomain.com/app/webroot/x/

If I do include the trailing slash on my request the URLs do not have
app/webroot in them. Is this something I can correct with a route or
my htaccess? mod_rewrite is enabled, and the default htaccess rules
that came with cake are in place.

Thanks in advance if someone can help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---