• Skip to Content
  • WordPress
  • Articles
  • Tools
  • Hire Me
  • Advertise
  • Sitemap
  • Contact
  • Speaking
Yoast tweaking websites
Follow Yoast on Twitter, or subscribe to this blog by email or RSS!

Optimizing your Apache and PHP environment can be a sport. Writing about it is fun too, so that’s what I do in this category.

How to remove www from your URL with mod_rewrite

Apr 08, 2007 Joost de Valk 38 comments

I got a hit today for the following search query: how do you get rid of the www in url. As you can see that hits on my article about removing PHPSESSID's, which isn't quite what the person was looking for I guess. Here's the code to 301 redirect the www version of your site

Tags: Serverside
Categories: SEO, Serverside

PHP-APC: Speed up your web applications!

Apr 08, 2007 Joost de Valk 15 comments

As regular readers of this blog might know I have written quite some tools using the different API's of search engines, and always found them quite useful. When I was implementing my sitewide search function, one of the things that bothered me that it was a bit slow. I knew that I had seen some

Tags: PHP
Categories: Serverside

PHP 301 redirects for Apache and IIS

Apr 02, 2007 Joost de Valk No comments

This one is just here for my own reference, because the default 302 status code just isn't good enough!
PHP 301 for Apache:
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.example.com/newpage/");
exit;
PHP 301 for IIS:
header("Status: 301 Moved Permanently");
header("Location: http://www.example.com/newpage/");
exit;

Tags: PHP, Serverside
Categories: Serverside, Webdesign & development

Convert underscores to dashes with Apache mod_rewrite

Mar 25, 2007 Joost de Valk 1 comment

Update: (Aug 4 2007) the stuff below is no longer necessary, all major search engines now treat underscores and dashes exactly the same, as word separators!
A year or so back, I was using underscores in my URL's on this site for spaces, and I decided to switch them to dashes, since several people, including

Tags: Serverside
Categories: Serverside

Trailing double forward slashes in URL's in the SERPs...

Mar 17, 2007 Joost de Valk 8 comments

This query gives a result I hadn't seen before (image), the same page was indexed with both a single trailing forward slash, which is of course normal, and with a double trailing forward slash... This is of course a duplicate content issue, especially when people link to the double slash one by accident. The fix

Tags: Serverside
Categories: Serverside
Subscribe to my RSS feed
to receive more tips on WP,
marketing and blogging!

Signup to my WP NEWSLETTER

to get all you need to improve your blog!
Click here to advertise

WordPress Hosting

Yoast is proud to be hosted by WestHost, one of the oldest hosting companies in the US and the #1 most reliable hosting provider according to Netcraft for four times in 2008. Interested? Go check out their special offer for Yoast readers now!

  • Find me elsewhere
  • LinkedIn
  • Twitter
  • Vimeo
  • Google
  • Google Maps
  • Facebook
  • StumbleUpon
  • FriendFeed
  • Flickr
  • Amazon

Categories

  • Analytics
  • Magento
  • Offtopic
  • Online Marketing
  • SEO
  • Serverside
  • Social Media
  • Webdesign & development
  • WordPress

Friends

  • Bas van den Beld
  • Dave
  • Dixon Jones
  • Eduard Blacquière
  • Jennifer Slegg
  • Kristjan Mar Hauksson
  • Martijn Anschüz
  • Martijn Beijk
  • Mediadonis
  • Mel Carson
  • Merch Europe
  • Mikkel deMib Svendsen
  • Nina “LinkSpiel” Baumann
  • OrangeValley
  • Ramon Eijkemans
  • Roy Huiskes
  • Shoemoney
  • Social Media Blog [NL]
  • Sugarrae
  • Web Hosting UK

AdAge

#54
© 2003-2009 Joost de Valk
Some Rights Reserved - Privacy Policy - Sitemap
Web Site Design & Web Server Optimization by W3 EDGE
Valid XHTML. Proud to be served by WordPress.
Hosting for yoast.com is provided by WestHost, get your own hosting package at WestHost at a special deal right now!