When you change domains, for instance using my moving WordPress to a new domain guide, you’ll usually redirect your visitors with something looking like this: Redirect 301 / http://new.example.com/ The only issue with this is that people might not notice that you’ve moved to a new domain, and thus might not update their links to [...]
Yoast tweaking websites
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
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 [...]
PHP-APC: Speed up your web applications!
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 [...]
Categories: Serverside
PHP 301 redirects for Apache and IIS
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;
Convert underscores to dashes with Apache mod_rewrite
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 [...]
Categories: Serverside
Trailing double forward slashes in URL’s in the SERPs…
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 [...]
Categories: Serverside