Serving frontend and backend from the same document root with symfony
For quite some time I've been struggling to set up the backend of a symfony application to be served from a subdomain that is being served by the same document root, to no avail. My backend subdomain would keep serving my frontend. Today, by accident, I found out which stupid mistake prevented this from working, so I thought I'd share.
Quite often have I been staring at my virtualhost setup for the admin subdomain of this application, wondering why the hell it kept serving the frontend. I'd set the DirectoryIndex to backend.php, so why did it keep serving the frontend? There would be no reason for it to do that, it seemed to ignore my DirectoryIndex setting!
Today, for something unrelated, I opened my project's .htaccess file and realised my mistake. Apache had been configured perfectly well for all this time. Because of course, the rewrite rules in the .htaccess were configured to point to index.php!
So, I moved all the rewrite rules into both my frontend and my backend vhost, changed the backend vhost to rewrite into backend.php, and lo and behold: it worked! All this time I was not considering the .htaccess!
Now, having moved the settings into my virtualhost setup has another advantage: performance. Apache now doesn't need to parse my .htaccess anymore (which it has to do on every request) but instead parses the virtualhost at startup and then remembers the settings. So the application should be performing better as well! Double WIN!
March 23, 2009 - tags: symfony, php, howto, apache, vhost, rewrite, directoryindex
digital recorder player
: if there is no driver, the car won’t move. the zoom h2 stands alone in an increasingly crowded field of handheld portable digital recorders. rca digital voice recorder user manual size: 2.47 mb.
: new york; the guilford press, a division of guilford publications, inc. this is why we make our fertilizers out of the highest quality materials available and do not use any manure or waste products. several thousands of samsui women came to singapore in the early twentieth century. green manure crops include mustard, clover, hairy vetch, buckwheat, alfalfa, lupine, rye etc. here is a sample of some unique small business ideas for people who love working with children and teens:
chex cereal gluten free
: sandy was sitting at the bar drinking double whiskies in one gulp as fast as the barman could put them in front of him. i know we love to make all kinds of muffin sandwiches from leftover meats and i think you will too after you give these suggestions a try. information on why does milk make cereals soggy at reference.com, food_and_drinks section. couple the drink with a hearty salad and meal using tofu to replace red meat or chicken, finely chopped fresh garlic and extra virgin olive oil.
cd players personal
: you are here: home › audio › voice recorders. whenever i browse to select where the songs will go, i can't find my mp3 player on the list. download fast money onto your mp3 player. is a unit that enables playback of digital mp3/wav files etc to and from a computer based programme via midi or dvs based discs or provides playback directly via a standard dj mixer set up.
Born This Way Piano Sheet Music Free Printable
: many online violin lessons are taught by famous violinists from the world stage. this type of teacher is to be grasped whilst you still can. while we know that amati created the first ever violin in the world, it is also known that his violins were not the best ever made violin. his violins were said to be of a bigger size, and with a softer and weak tone, which was not favored by many violinists. violin lessons online - violin master pro
mp3 player rca
: the ipod touch is essentially an iphone without a phone, and offers apps and a pda-like experience you don't normally get with an mp3 player. plus-no radio, no alarm-it's not even a comparable unit even though it sells at retail for the same price as the geneva s. other manufacturers quickly caught on and cloned the personal stereo concept. [:] attach the "antenna" alligator clip to the radio's antenna, the ground to chassis ground, and plug in the mp3 player. usb portable speaker sd card u disk mp3 player fm radio black rechargeable new.
microscope zeiss price
: you can also use microscopic filters instead to do this final step of processing the ethanol gas. that incredible confession, uttered by a confessed pig, received an enormous amount of ink, probably because simultaneous with his cheating, he was screaming for bill clinton's impeachment for doing the exact same thing. "rocky" is etched into the flat side of a small boulder, just above ground level that indeed makes it appear like a tombstone of some kind. the value was 0.15 microfarad and a new capacitor brought the lcd monitor back to life again.