All posts by Simon

Adding 301 Permanent Redirect Code

If you want to redirect all pages of an entire site to the main page of another domain, add the following code to your .htaccess file:
RedirectMatch 301 (.*) http://www.example.com/

The .htaccess file should be stored in the same location as the index page to your OLD domain that you are redirecting from.

If you want to redirect one page to another page:
redirect 301 /old-file-name.htm http://www.example.com/new-file-name.htm

If the old page is within a different directory (folder) as your index page, then you would need to adjust the path of the old file name accordingly.

For example, if the old file name is located within a directory named category, your code would be as follows:
redirect 301 /category/old-file-name.htm http://www.example.com/new-file-name.htm

If the old page is within a different directory (folder) as your index page, and you also want the new page within that same directory, then you would need to adjust the path of the old and new file name accordingly.

For example, if the old file name is located within a directory named category, and the new page will be also, your code would be as follows:
redirect 301 /category/old-file-name.htm http://www.example.com/category/new-file-name.htm

Again, make sure you save any changes you’ve made.

WordPress permalinks on WAMP

WordPress and WAMPserver are one of the best buddies when you want to write a personal localhost’ed blog. Recently, when I installed wordpress and chose to use ‘pretty permalinks’, all I got is Error 404-File not found. i checked the .htaccess file if the changes have been written to it. Yes, the changes were made to it and yet it won’t work.

The silly mistake I was making all the time was trying it with mod_rewrite disabled. Having used XAMPP in the past-which has mod_rewrite enabled by default, I had no idea that for WAMPserver, it would be turned off by default. So the simple fix is to enable mod_rewrite. To enable it, follow the below steps:

Click on the WAMPserver tray icon > Apache > Apache modules > Scroll down the list of available modules and clcik on ‘rewrite_module’. The Apache server would be restarted automatically and you can now use the pretty permalinks.

This also works for the ‘Internal Server Error’ error message as well.

Redirecting mail using Thunderbird

Thunderbird, the Mozilla mail reader, comes with the ability to Forward an email (via an icon on the toolbar) which will send out the email under your name.

Sometimes it’s desirable to Redirect (or “bounce”) a message. Although it’s possible to detect that a message has been redirected, it looks very much like the original message with the same To, From, Subject, Date, etc., headers. In Thunderbird, this can be accomplished by downloading and installing a Thunderbird add-on.

The Mail Redirect add-on can be downloaded from: https://addons.mozilla.org/en-US/thunderbird/addon/550

After you install it (per the instructions on that page), you will probably want to add its icon to your toolbar (next to the Forward icon). Right click on the toolbar and select Customize… Drag the Redirect icon onto the toolbar where you would like it to be.

Now you can “bounce” a message simply by clicking on the Redirect icon.

Easy TomTom7 Screen rotation

Change your registry settings to enable screen rotation:

HKLM – System – GDI – Rotation – HideOrientationUI (Change from 1 to 0)

Soft Reset your phone, once loaded map your call button to the rotation tweak:

Settings -> Buttons -> Map with < Rotate Screen >

When you would like to rotate your screen, just hold your call button. This will work on any application you want to run.

TomTom Image

Show Thumbnails for Adobe CS2/CS3 files

When i moved to CS2 and then CS3 I noticed that the thumbnail views for Illustrator and Photoshop files had been disabled since the introduction of ‘Bridge’ (which I don’t like by the way).

Heres the instructions.

1. Download this zip file.
2. Shut down any open Adobe programs.
3. Set a ‘system restore point’ (just incase).
4. Unzip it to ‘C:\Program Files\Common Files\Adobe\Shell’.
5. Run both .reg files included.

Thats it! Just a matter of enabling the thumbnail view in explorer and look at all those pretty icons.