Apache already comes pre-installed on OS X but PHP is not enabled by default. To enable PHP we need to edit our Apache config file by opening the Terminal and typing sudo nano /private/etc/apache2/httpd.conf and hitting enter (put in your admin password when it asks.) Type Control+W to bring up the search option and type [...]
Posts in Code
Running PHP and MySQL with phpMyAdmin on OS X 10.5
Tuesday, June 23rd, 2009
Apache rewrite rules to force secure/non-secure pages
Sunday, March 29th, 2009
If you’re running an Apache server there’s no need to hard code your links to force https/http or write server-side code. A few simple rewrite rules will allow you to redirect your secure pages to https and your non-secure pages back to http.
Search engine friendly URLs in PHP and Apache, Take 2
Wednesday, December 3rd, 2008
A while back I posted this article about friendly URLs in PHP and Apache. Today I’d like to update that a little to not only show another method but also to enhance it a bit. When we’re done we’ll have search engine friendly URLs that look like the ones that Blogger uses.
Why? Because search engines [...]
Friendly URLs in PHP and Apache
Monday, March 17th, 2008
I’ve tried a few different ways of doing friendly URLs in PHP and all have their advantages and disadvantages. For a good introduction and some other methods that don’t necessarily require an Apache server, take a look at this sitepoint article. I’ve used Method 2 there before (.htaccess Error Pages) but I don’t [...]