shared SSL + cakePHP, path question
https://abc.hostingcompany.com/~myusername/img/test.jpg //works, shows the test image
https://abc.hostingcompany.com/~myusername/contact //404 error
http://www.my开发者_开发百科domain.com/contact //works as expected, so why dosent #2?
I dont understand how cakePHP 'pages' can be routed to, using SSL.
As I understand it, using relative paths is what you are supposed to do, which I have done. I know there is a component built into cakePHP for security, but for now, just getting the (for example) https version of the contact page link to work is perplexing me.
In my research, I discovered that you can use .htaccess command RewriteBase to convert between the shared version of the URL and the cakePHP version of the url.
I also learnt that relative pathing is important, and that /img/test.jpg is not the same as img/test.jpg (One assumes the root, the other does not).
As long as Im sharing what I found out... (yeah, noob material here... Id like to see any other page on the net with all this in the same spot)
The https version is the same code (pulled from the same folders I mean) as the http code.
Turning on (using) and off https is as simple as a link to https://[yoursite] and http://[yoursite].
And a shoutout to the people at apacheserver.net ripping this off stackoverflow.com. (Its already in the google search results... holy cow)
精彩评论