Using double-colons in site paths

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Using double-colons in site paths

Postby triple7 » 16. November 2009 15:36

Hello, I've just setup a new dev environment for my project on Windows 7, and I'm trying to use double-colons in my URL's (I.e. http://localhost/user::username/edit). However, XAMPP (Apache) is set to parse the URL and treat everything after a colon as a port number which is clearly problematic for my situation. I'd like to set Apache up so that it behaves more like a "standard" webserver, where it only accepts "standard" ports and ignores all other colon-related uses in the URL.

I'm not an expert in Apache configuration, but seeing as how this works fine on my work environment I see no reason why I should be able to reproduce this behaviour on my dev environment. Right?

So to sum it up... I want to be able to use colons (double, triple, doesn't really matter) without getting a 403 error. :)

Your help will be greatly appreaciated!
triple7
 
Posts: 3
Joined: 16. November 2009 15:28

Re: Using double-colons in site paths

Postby Wiedmann » 16. November 2009 16:00

I'd like to set Apache up so that it behaves more like a "standard" webserver,

Apache is /the/ standard webserver. Even on Windows (and XAMPP).

However, XAMPP (Apache) is set to parse the URL and treat everything after a colon as a port number

No, Apache is not doing such things. But colons are not allowed in your underlaying filesystem (ntfs/fat).

I'm trying to use double-colons in my URL's

Maybe you can explain what are you trying to do? (maybe something with mod_rewrite?)
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Using double-colons in site paths

Postby triple7 » 16. November 2009 20:36

My use of the term "standard" like that was in reference to my desire to duplicate the same behavior of a server one might find in a shared hosting service. Granted, my OS is Windows and the hosted server is Linux, but I don't see how it should affect the behavior of Apache in a browser. The OS doesn't care what you type inside the browser's address bar as long as it is a valid URL, and since this works on my hosted server, it should, at least in theory, work on my local server, no? :?

Perhaps my example was not clear enough or indicative enough of what I'm interested in achieving. What I'm trying to do (and am able to do on my hosted server, using thesame php files and the same .htaccess files) is be able to use two colons one after the other in my "pretty URL's" so, instead of using something like http://domain.com/books/view/12345678 I'd like to have this: http://domain.com/book::12345678.

I'm using CakePHP to develope the site, and I already have it working on my hosted server, so I know it'spossible. The problem is that when I try to run the same code on my XAMPP installation everything works until I try to go to a URL that has a double-colon (::) in it, at which point the server throws me a 403 error. Accessing the same entry via the plain URL (E.g. http://domain.com/books/view/12345678) works fine, so this is not a database issue.

Hope this clarifies everything up for you.

Thanks for your input thus far!
triple7
 
Posts: 3
Joined: 16. November 2009 15:28

Re: Using double-colons in site paths

Postby Wiedmann » 16. November 2009 21:30

and the same .htaccess files

Which ".htaccess"?

http://domain.com/books/view/12345678 I'd like to have this: http://domain.com/book::12345678.

- So you want rewrite "http://domain.com/book::12345678" to "http://domain.com/books/view/12345678"?

- The target of this URL path is a "index.php" in your DocumentRoot?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Using double-colons in site paths

Postby triple7 » 16. November 2009 23:46

Wiedmann wrote:Which ".htaccess"?

It's just Cake's basic .htaccess file that re-writes requests to index.php if there's no corresponding folder/file for it.

Wiedmann wrote: So you want rewrite "http://domain.com/book::12345678" to "http://domain.com/books/view/12345678"?

Yes, but like I said, I'm using CakePHP, which does it's own re-writing and routing. The code works as is, on BlueHost, which is a shared hosting provider. All I want is to be able to run my code locally on my XAMPP setup.

I'm clueless in all things Apache, so I wouldn't know if there's a way to tell it to parse URLs a certain way, but from the little experience that I do have with it, I would imagine there is. Again, Cake's routing works perfectly fine for all other re-writes. I have several other projects running the same setup but without double-colons, so the problem has to be somewhere in my setup. And since I'm using a default XAMPP setup, I'm not sure what might be causing this. Is there a log or something I can look at that will tell me what object is trying to be accessed when I get the 403? Maybe that'll shed some light on the cause...
triple7
 
Posts: 3
Joined: 16. November 2009 15:28

Re: Using double-colons in site paths

Postby Wiedmann » 16. November 2009 23:52

Yes, but like I said, I'm using CakePHP,

So maybe you want ask the CakePHP support how to setup Apache with the correct settings for this software? (I don't know the prerequisites for CakePHP or which specific settings this software needs)

Is there a log or something I can look at that will tell me what object is trying to be accessed when I get the 403?

Logs are in the .apache//logs directory.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 60 guests