|
|
|
When Wordpress Permalinks 404
he 404/Not Found error will not display it.) message is one of the most hated screens on the In most cases, the 404 error Internet; it indicates that comes up when a page has been though you, the browser, were moved or deleted from a site. able to communicate with the However, in the case of server, the page you need was not WordPress, an annoying bug can delivered either because it was cause permalinks to point to the not found or because the server 404 page instead of the page you for some reason was configured to want to have it bring up. not fulfill the request (which is happening in some countries with How Do WordPress Permalinks Work? pages containing illegal content). Permalinks are permanent URLs generated to point to your The page you actually see is not individual weblog posts, generated by your computer; categories, and weblog lists. instead, it is a special page on Other bloggers will use a the server you've tried to permalink to point to your post contact. Many web sites create from their own articles, or you their own special 404 pages can send links to other people either for artistic reasons, or via a permalink. When they are because the site owner wants to linked to an individual post, the put specific data, like contact URL is supposed to be permanent, or redirect information, on the not dynamic (changing). page. In Apache, having your own special 404 page is as simple as The three types of permalinks modifying the .htaccess file. WordPress delivers are the (The only caveat: the page must Default (aka "Ugly") form, mod be larger than 512 bytes or IE rewrite ("Pretty"), and PATHINFO
("Almost Pretty"). target="_blank">http://example.co m/index.php/yyyy/mm/dd/post-name/ Default links are formatted , and will work on other according to the default settings server types besides Apache. of a new WordPress install, and will work on all server Because you're going from a environments. It looks like this: dynamic to a fixed environment title="http://example.com/?p=N" of things can go wrong with them. target="_blank">http://example.co For instance, if your server m/?p=N , N being a number. It includes Frontpage Extensions, is neither neat nor elegant, but permalinks will not function at it does the job. Pretty mod all without doing a manual fix. rewrite links look more like Without this fix, any changes to this: href="http://example.com/yyyy/mm/ WordPress admin interface will dd/post-name/" corrupt the Frontpage server title="http://example.com/yyyy/mm extensions because it interferes /dd/post-name/" with the .htaccess file. target="_blank">http://example.co m/yyyy/mm/dd/post-name/ . Long permalinks can get chopped These permalinks require Apache's off as well, with only part of it mod_rewrite module, and won't working properly or with the work on other server types. entire link disabled. This will PATHINFO permalinks look like cause a 404 error to be generated this: href="http://example.com/index.ph something wrong with your p/yyyy/mm/dd/post-name/" permalink, rather because the title="http://example.com/index.p title is too long. You can fix it hp/yyyy/mm/dd/post-name/" by editing your .htaccess file to
add a line: When you're creating permalinks, another strange thing can happen: RewriteRule your WordPress blog must start ^post/([0-9]+)?/?([0-9]+)?/?$ the process of creating a /index.php?p=$1&page=$2 [QSA] permalink before it knows whether or not the page you're creating You can also make a habit of one for actually exists. If it posting URLs with angle brackets doesn't, too late - your link is () on either end. Most email and already pointing at a 404 page. other problematic software won't To repair this, you need to truncate URLs formatted this way. include a 404 direction in the header of your .htaccess file so Permalink Structure in WordPress that your rewrite conditions allow for a not-found error, and When your links don't work, it's simply eliminate that page from often because you didn't update your permalinks task. Try adding your Permalink structure. Every the following line above the time you add a new static page to WordPress rewrite rules, outside your WordPress files, you must of #BEGIN Wordpress[...]#END generate and update new rules to Wordpress. Some plugins will the .htaccess (which in newer overwrite this part if you edit versions is taken care of through the permalinks structure if it's the admin control area). If you in the wrong place. don't get a page returned at all, even a 404, and you use PHP 4.4 ErrorDocument or 5 with Apache 2, you should 404/index.php?error=404? look that up in the PHP bugs and issues pages. This is a specific Another solution is to use this known bug. following:
ErrorDocument One more thing: if you use the 404/foo/index.php?error=404 xampp setup, your WordPress permalinks won't work at all in foo = the directory you are using the default installation.. as a blog. The structure should be like this: The ultimate solution is actually to install WordPress 2.0.2; this /foo/%category%/%postname%/ new version has repaired the permalinks problem as well as a If you call a nonexistent number of other problems. directory, however, you're still going to get that 404 permalink. Always double-check all your pages before you start working You can automate your permalinks with permalinks, and after you've tasks with several plugins, permalinked them. In some cases, though. The Ultimate Tag Warrior you may have to delete all the (UTW) has gotten some good permalinks and start over, but in reviews, especially for most cases just taking a look at search-engine sensitive pages. what you're telling your server Google Sitemaps is a good plugin to do will prevent you from as well. making a lot of stupid mistakes.
About the Author:
http://www.theinternetone.net
Read more articles by: Danny Wirken
Article Source: www.iSnare.com
|
|