This link has been bookmarked by 305 people . It was first bookmarked on 24 Apr 2006, by Morten Mork.
-
03 Apr 16
-
apache/conf/httpd.conf
-
LoadModule rewrite_module modules/mod_rewrite.so
-
"Options FollowSymlinks"
-
-
02 Mar 16
-
07 Mar 15
-
Using Permalinks
-
Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings.
-
Permalink Types
-
three basic types of WordPress permalinks:
-
Default: "Ugly"
-
http://example.com/?p=N
-
where N is the Post ID number.
-
mod_rewrite: "Pretty Permalinks"
-
but the most common, and most versatile looks like
-
http://example.com/2012/post-name/
-
http://example.com/2012/12/30/post-name
-
PATHINFO: "Almost Pretty"
-
PATHINFO permalinks look very much like mod_rewrite permalinks but for one exception: they have /index.php inserted before them, like so:
-
http://example.com/index.php/yyyy/mm/dd/post-name/
-
Anything that mod_rewrite permalinks can do, PATHINFO permalinks can do, with the help of that /index.php part.
-
You never, ever put your site url in the permalinks slot. You must use one of the structure tags, or a combination of tags only.
-
Please note:
-
To activate PATHINFO permalinks, start your permalink structure with index.php/.
-
Structure Tags
-
Make sure to end your structure with either %post_id% or %postname% (e.g. /%year%/%monthnum%/%day%/%postname%/) so that each permalink points to an individual post.
-
%postname%
-
A sanitized version of the title of the post (post slug field on Edit Post/Page panel). So “This Is A Great Post!” becomes this-is-a-great-post in the URI.
-
%category%
-
A sanitized version of the category name (category slug field on New/Edit Category panel). Nested sub-categories appear as nested directories in the URI.
-
Category base and Tag base
-
The Category base and Tag base are prefixes used in URLs for category and tag archives, which look like this:
-
example.net/wp/category_base/category_name
-
example.net/wp/tag_base/tag_name
-
The default values for these are category and tag. You can change them, but you can't remove them from the URLs altogether.
-
Custom permalinks work on most systems without any problems, but there are still some conditions where problems occur.
-
Using %category% with multiple categories on a post
-
When you assign multiple categories to a post, only one can show up in the permalink.
-
The post will still be accessible through all the categories as normal.
-
Using "Pretty" permalinks
-
Requirements:
-
Apache web server with the mod_rewrite module installed
-
The FollowSymLinks option enabled
-
-
- An .htaccess file (if this file is missing, WordPress will try to create it when you activate "pretty" permalinks)
- If you want WordPress to update the .htaccess file automatically, WordPress will need write access to the file.
-
When you create or update a "pretty" permalink structure, WordPress will generate rewrite rules and attempt to insert them into the proper .htaccess file. If it can't, it will say something like You should update your .htaccess now and print out the rules for you to copy and paste into the file (put them at the end).
-
Where's my .htaccess file?
-
WordPress's index.php and .htaccess files should be together in the directory indicated by the Site address (URL) setting on your General Options page.
-
the file may not be visible through an FTP client unless you change the preferences of the FTP tool to show all files, including the hidden files.
-
Some hosts (e.g. Godaddy) may not show or allow you to edit .htaccess if you install WordPress through the Godaddy Hosting Connection installation.
-
Creating and editing (.htaccess)
-
If you are using FTP to transfer files, create a file on your local computer, call it 1.htaccess, upload it to the root of your WordPress folder, and then rename it to .htaccess.
-
The following permalink rewrite code should be included in your .htaccess file (since WordPress 3.0):
-
If your .htaccess file contains errors that bring down your site ("Internal Server Error (500)"), you will need to use FTP or your host's control panel to delete the rogue .htaccess file.
-
Automatically updating .htaccess
-
If you want to let WordPress do this, you'll need to give WordPress write access to the .htaccess file. The exact permissions necessary depend on your server setup. Try adding write permissions for the owner, then group, then world, testing after each change; once WordPress has edited the file successfully, don't add any further write permissions
-
After applying the permalinks, you should change the permissions to something stronger like 660 or 644 to prevent others on the server from potentially having access to it.
-
If this isn't an option, you can try PATHINFO permalinks; put index.php/ at the start of your custom permalink structure:
-
/index.php/%year%/%monthnum%/%day%/%postname%/
-
To make this option work on IIS, add these 2 lines to a php.ini file and store that file in your webroot :
-
Fixing Permalink Problems
-
Users of XAMPP (Windows):
-
Users of WAMP (Windows):
-
Long Permalinks
-
Remember, each time you add a new static Page to WordPress, new rules must be generated and updated to .htaccess (WordPress 1.X) or to the internal rewrites array (WordPress 2.X).
-
-
05 Mar 15
-
05 Feb 15
v bailey"See Also
User:Lazyking/Using Permalinks (Saetta Web Server)
Linking Posts Pages and Categories for how to link from one article to another "wordpress permalinks mod_rewrite htaccess permalink howto wp pretty apache
-
15 Oct 14
Briayan Gomez"# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress" -
03 Sep 14
-
Using %category% with multiple categories on a post
When you assign multiple categories to a post, only one can show up in the permalink. The categories are ordered alphabetically. In each group of sub-categories the order will also be alphabetical. (see Manage Categories). The post will still be accessible through all the categories as normal.
Try the WP Category Permalink plugin if you want to choose which category shows up in the permalink.
-
-
25 Jul 14
-
18 Jun 14
-
21 Apr 14
-
If you are using IIS 7 and have admin rights on your server, you can use Microsoft's URL Rewrite Module instead. Though not completely compatible with mod_rewrite, it does support WordPress's pretty permalinks. Once installed, open the web.config file in the WordPress folder and add the following rule to the system.webServer element
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="WordPress Rule" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php?page_id={R:0}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> -
web.config
-
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="WordPress Rule" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
-
-
02 Apr 14
-
26 Mar 14
-
versatile
-
PATHINFO: "Almost Pretty"
-
but for one exception: they have /index.php inserted before them,
-
PATHINFO permalinks look very much like mod_rewrite permalinks
-
To activate PATHINFO permalinks, start your permalink structure with index.php/.
-
Make sure to end your structure with either %post_id% or %postname%
-
so that each permalink points to an individual post.
-
Category base and Tag base
-
Category base and Tag base are prefixes used in URLs for category and tag archives
-
he default values for these are category and tag
-
You can change them, but you can't remove them from the URLs altogether.
-
only one can show up in the permalink
-
"Pretty" permalinks usually require mod_rewrite, and IIS (common on Windows servers) does not support mod_rewrite.
-
If you are using IIS 7 and have admin rights on your server, you can use Microsoft's URL Rewrite Module instead
-
If this isn't an option, you can try PATHINFO permalinks; put index.php/ at the start of your custom permalink structure:
-
-
21 Mar 14
-
Permalinks are the permanent URLs to your individual weblog posts,
-
The URL to each post should be permanent, and never change — hence permalink.
-
Permalink Types
-
Choosing your permalink structure
-
Using "Pretty" permalinks
-
Permalinks without mod_rewrite
-
Permalinks, .htaccess, and MS Frontpage
-
dit your .htaccess file and add the following:
-
RewriteRule ^post/([0-9]+)?/?([0-9]+)?/?$ /index.php?p=$1&page=$2 [QSA]
-
http://yourdomain.example.com/post/(the ID #)
-
Avoiding interpretation as an archive link
-
one might never make more than one posting a day,
-
One needs at least %year%%monthnum%%day%%hour% to target an individual post.
-
A way to check if the blog has a permalink structure is:
-
-
14 Nov 13
-
08 Oct 13
-
20 Sep 13
Ageyron PointPermalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to link to your article (or section), or how you might send a link to your story in an e-mail message. The URL to each post should be permanent, and never change — hence permalink.
-
05 Sep 13
-
30 Jul 13
-
26 Apr 13
-
17 Apr 13
-
10 Apr 13
-
26 Mar 13
-
"Pretty" permalinks usually require mod_rewrite, and IIS (common on Windows servers) does not support mod_rewrite. (If you are using Apache 2.0.54, on Windows, mod_rewrite may work, provided it is enabled in apache\conf\httpd.conf.)
-
"Pretty" permalinks usually require mod_rewrite, and IIS (common on Windows servers) does not support mod_rewrite. (If you are using Apache 2.0.54, on Windows, mod_rewrite may work, provided it is enabled in apache\conf\httpd.conf.)
-
-
19 Feb 13
-
19 Sep 12
-
26 Aug 12
-
23 Jul 12
-
20 May 12
-
Using %category% with multiple categories on a post
When you assign multiple categories to a post, only one can show up in the permalink. This will be the lowest numbered category (see Manage Categories). The post will still be accessible through all the categories as normal.
-
-
19 May 12
-
20 Dec 11
-
12 Dec 11
Carl FrankeTo fix Category link problems, do up the .htaccess in this article. You'll have to copy it out of an existing template.
-
06 Nov 11
-
When you assign multiple categories to a post, only one can show up in the permalink. This will be the lowest numbered category (see Manage Categories). The post will still be accessible through all the categories as normal
-
-
04 Nov 11
-
-
18 Oct 11
Mike Elliott"# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress"
-
11 Oct 11
-
27 Sep 11
-
25 Sep 11
Hagure Metaru%year%%monthnum%%day%%hour%%minute%%second%%post_id%%postname%%category%%tag%%author%
-
21 Sep 11
-
19 Sep 11
-
categories and other lists of weblog postings.
-
-
16 Sep 11
-
02 Sep 11
-
01 Sep 11
-
31 Aug 11
-
25 Jul 11
-
13 Jun 11
-
21 May 11
-
RewriteRule ^post/([0-9]+)?/?([0-9]+)?/?$ /index.php?p=$1&page=$2 [QSA]
-
RewriteRule ^post/([0-9]+)?/?([0-9]+)?/?$ /index.php?p=$1&page=$2 [QSA]
-
-
07 May 11
-
09 Apr 11
-
04 Apr 11
-
02 Apr 11
-
31 Mar 11
-
25 Feb 11
-
22 Feb 11
Pontus Sundén$is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
wordpress howto apache htaccess default 404 rewrite permalinks mod_rewrite
-
Server Blockage:
-
$is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
-
$is_apache = 1;
-
-
11 Feb 11
-
10 Jan 11
-
25 Dec 10
-
26 Nov 10
-
08 Nov 10
-
30 Oct 10
-
15 Oct 10
-
11 Oct 10
frederic simonetMAJ .\xampplite\apache\conf\httpd.conf | Décommenter : LoadModule rewrite_module modules/mod_rewrite.so | Stop/Start du serveur
-
26 Aug 10
-
11 Aug 10
-
30 Jul 10
-
Default: "Ugly"
The default looks like
http://example.com/?p=N
-
mod_rewrite: "Pretty Permalinks"
Using mod_rewrite or lighttpd you can produce much nicer permalinks (see Pretty Permalinks). There are many different formats, but the most common, and most versatile looks like
http://example.com/category/post-name/ or http://example.com/year/month/day/post-name
-
Some people eliminate some or all of the date elements (day, month, year) to have a shorter permalink format
-
- pache web server with the mod_rewrite module
- Microsoft IIS 7+ web server with the URL Rewrite 1.1+ module and PHP 5 running as FastCGI
- Microsoft IIS 6+ using ASAPI_Rewrite
- Lighttpd using a 404 handler or mod_rewrite or mod_magnet (see External sources)
-
hen you assign multiple categories to a post, only one can show up in the permalink. This will be the lowest numbered category (see Manage Categories). The post will still be accessible through all the categories as normal.
-
The same thing applies to using the %tag% field in your permalink structure.
-
- Apache web server with the mod_rewrite module installed
- In WordPress's home directory,
- The FollowSymLinks option enabled
- FileInfo directives allowed (e.g.
AllowOverride FileInfoorAllowOverride All) - An .htaccess file (if this file is missing, WordPress will try to create it when you activate "pretty" permalinks)
- If you want WordPress to update the .htaccess file automatically, WordPress will need write access to the file.
-
When you create or update a "pretty" permalink structure, WordPress will generate rewrite rules and attempt to insert them into the proper .htaccess file. If it can't, it will say something like You should update your .htaccess now and print out the rules for you to copy and paste into the file (put them at the end).
-
-
27 Jul 10
-
20 Jul 10
Daniel Thales Naves# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
-
08 Jul 10
-
07 Jun 10
-
31 May 10
-
22 Apr 10
-
16 Apr 10
-
21 Mar 10
-
13 Mar 10
-
When you create or update a "pretty" permalink structure, WordPress will generate rewrite rules and attempt to insert them into the proper .htaccess file. If it can't, it will say something like You should update your .htaccess now and print out the rules for you to copy and paste into the file (put them at the end).
-
-
02 Mar 10
Abi AbinandananThis help page on WordPress.org should also be useful for the problem I have with permalinks on my blog. It has links to tutorials on .htaccess files and ReWrite rules in those files -- this will be of more general use.
WordPress Permalink BuddyPress URL Clean Pretty Mod_ReWrite Apache webserver hosting
-
06 Feb 10
-
03 Feb 10
-
31 Jan 10
Nik GoileHow to fix annoying error with permalinks in IIS installed Wordpress blog.
-
01 Jan 10
-
27 Dec 09
-
18 Dec 09
-
12 Dec 09
-
07 Dec 09
-
04 Dec 09
-
18 Nov 09
-
16 Sep 09
-
27 Jul 09
-
17 Jul 09
-
03 Jul 09
-
30 Jun 09
-
10 Jun 09
-
14 May 09
-
11 May 09
-
Users of XAMPP (Windows): Some versions of XAMPP do not enable mod_rewrite by default (though it is compiled in Apache). To enable it — and thus enable WordPress to write the .htaccess file needed to create pretty permalinks — you must open apache/conf/httpd.conf and uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (i.e., delete the hash/pound sign at the front of the line).
-
-
19 Apr 09
-
15 Apr 09
-
04 Apr 09
-
02 Apr 09
-
29 Mar 09

Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.