Tuesday, January 27, 2009

Re: Help with website architecture...

Pete,

I never really thought about this. I am going to have to look at this
more. My initial example doesn't work as expected. I didn't realize
that when you use .htaccess to link outside of your site it actually
changes the URL in the address bar.

Example: RewriteRule ^onsale http://cake.example.dev/onsale [NC]

It then changes the URL to http://cake.example.dev/onsale, instead of
just running the script with the example.com/onsale. I guess this
makes sense, but I was hoping for a workaround on this since both
sites are on the same server (with Virtual Hosting).

It's looking like Pete's suggestion is the only option here.

Anyone else? I'm sure other people have had to integrate cakePHP into
small parts of their website without messing with the existing
structure....

-Jesse

On Jan 24, 5:18 am, "p...@otaqui.com" <p...@otaqui.com> wrote:
> Hi Jesse,
>
> If you look at the .htaccess file in the webroot you'll notice that
> the rules check the existence of a file before rerouting to the
> index.php file and letting it manage things.
>
> I think you could try applying the same kind of thing in the root
> directory's htaccess ... that is: only use cake if the file doesn't
> already exist.
>
> I'm not sure what extra overhead this would have, so serious load
> testing and keeping an eye on server would be a must here.  Probably
> your first thought - specifically routing to cake with a fixed set of
> url's, or at least fixed rules based on controller names - would be
> less trouble for your server to handle.
>
> On Jan 23, 9:01 pm, Jesse <jesseainsk...@gmail.com> wrote:
>
> > I need some advice on somearchitecturefor a website.
>
> > I am in charge of running a pretty significantly high traffic sites (3
> > sites that get around 400+ req. per sec at peek hours). The site was
> > started a long time and and thearchitecturewas not maintained very
> > well throughout the years. There is no framework in place as of now.
> > It's all static.
>
> > We have decided to try out using a cake framework for a couple project
> > to see if this will provide the speed we are looking for.
>
> > The problem develops when trying to "integrate" cake with the current
> > website. The website as of now is static.http://www.example.com/story
> > - There is a folder "story" in the root of htdocs. There is a lot of
> > dynamic database calls with parameters, but the entire site (thousands
> > and thousands of pages) is developed this way.
>
> > I would like to start integrating cake in, but I don't see a way of
> > doing this without causing a problem with the current site
> >architecture.
>
> > All of our servers are in house so having a "custom" install of cake
> > is not a big deal. Basically I'm looking for a way to have http:/www.example.com/onsaleusecake, without touching the root, or other
> > directories (http://www.example.com/story) that are not written in
> > cake.
>
> > One idea I had was creating a new user and setting up a subdomain
> > (http://cake.example.com). Then using .htaccess to rewrite (http://www.example.com/onsale) to (http://cake.example.com/onsale). If this
> > was all done through mod_rewrite I could keep the (http://
> > cake.example.com) url's private... but I'm not sure.
>
> > Any other suggestions?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: