Keyboard Face

when you find QWERTY imprinted on your cheek - it's time to go to bed.

Tags

asp CSS css menus dreamweaver flash gallery2 hosting iis7 Javascript jquery jquery ui left mac mssql os9 php printer rdp SEO sql sql server windows wordpress

WordPress Permalinks in IIS using Custom 404 Redirect

Update

There is a better way to do this now. Take a look at this post that describes it. This page is kept here for all that have already installed this solution.

Original Solution – Outdated Now

This has been tested with WordPress 1.5 and 2.0

If you have any trouble installing it, you can comment here and I’ll try and help you. Also, if you successfully use this on your server, let me know in the same thread. Thanks!


Requirements

     • IIS

     • WordPress 1.5 or 2.0

     • Ability to change your 404 error page with your web host.

 

Downloads     

 

This solution requires two files: errorpage.asp and htaccess.txt or htaccess.php.

     • Download the Files

 

Installation Instructions

 

1. Log into the admin section of WordPress.

 

2. Click on Options -> Permalinks

 

3. Set your Permalink Structure to “Custom” and enter in a pattern for your permalinks. WordPress has a section that gives all of the permalink structure tags. Mine is currently set to:

    Structure: /archives/%year%/%monthnum%/%day%/%postname%/
    Category Base: /archives/category

4. Click Update Permalink Structure

     

    5. Upload htaccess.php and errorpage.asp into the root directory of your blog.

     

    6. The steps used for this next step will vary depending on your hosting provider. Essentially, what you want to do is set a custom 404 redirect to “/errorpage.asp”. It is important that the type of redirect is set to URL. (There are several options.

     

    You can change this directly from within IIS by selecting Properties -> Custom Errors. Select 404. Edit. Set Message Type to URL (you have the option of File, URL or Default). Set it to /errorpage.asp

     

    7. Your done! Try it out. If it doesn’t work, post a comment on my blog and I’ll attempt to help you out.

     

    The script is now dynamic, meaning it uses htaccess.php to figure out what your permalink rules are. htaccess.php gets the rules directly from WordPress. Previous versions required you to copy/paste the rules from WordPress into htaccess.txt. This feature is still available for those that want to modify the rules from the standard that wordpress puts out.

     

    To do this:

    Get the rules either by accessing htaccess.php in a browser and then copying the source, or by navigating to the permalinks section in WordPress’ admin area.

     

    Paste the rules directly into htaccess.txt.

     

    Change this line in ErrorPage.asp.

    Dynamic = True

    Change it to:

    Dynamic = False

     

Pages

  • About Me
  • WordPress Permalinks in IIS using Custom 404 Redirect

Archives

  • May 2019
  • February 2019
  • January 2018
  • May 2016
  • April 2016
  • December 2015
  • November 2015
  • May 2015
  • April 2015
  • January 2013
  • March 2012
  • February 2012
  • December 2011
  • September 2011
  • August 2011
  • November 2010
  • October 2010
  • June 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • September 2009
  • August 2009
  • July 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • November 2008
  • September 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • December 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • January 2007
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • May 2005

ASP.NET Resources

  • Keven Roth’s Code Library
  • Lemon Law

Blogroll

  • Arin Morfopoulos
  • Jamie
  • Physical Therapists

Code Search Engines

  • Koders
  • Krugle

CSS & Design Resources

  • CSS Basics

Other

  • Amazon
  • Car Repair Questions
  • Cool Quizzes
  • Delphi LA
  • Physical Therapy Clinic Directory
  • Quickbooks Questions
  • Secret Santa Game

Site\'s I\'ve Designed or Helped With

  • Area Rugs
  • Dental Implants
  • Dental Website Design
  • FHA Loans
  • Secret Santa Gift Ideas