This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
permalinks [2011/02/14 01:19] ccagle8 |
permalinks [2012/02/15 02:04] ccagle8 [Adding .php or .html to URLs] |
||
---|---|---|---|
Line 22: | Line 22: | ||
Removes the ''index.php'' from URL. This can be done without Fancy URL's turned on: | Removes the ''index.php'' from URL. This can be done without Fancy URL's turned on: | ||
<code>?id=%slug%</code> | <code>?id=%slug%</code> | ||
+ | |||
+ | ===== Adding .php or .html to URLs ===== | ||
+ | |||
+ | If you want to add either ''.php'' or ''.html'' to your website's pages, you first need to set the **Custom Permalink Structure** to ''%slug%.php''. | ||
+ | |||
+ | Next, you need to make a small change to your root level ''.htaccess'' file. Change the Rewrite Rule to this: | ||
+ | <code>RewriteRule /?([A-Za-z0-9_-]+)\.php$ index.php?id=$1 [QSA,L]</code> | ||
+ | NOTE: Change ''.php'' to ''.html'' in the Rewrite Rule above if you are using that extension instead. |