User Tools

Site Tools


permalinks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
permalinks [2011/02/14 01:16]
ccagle8
permalinks [2013/03/27 12:31]
Timbow removed
Line 1: Line 1:
-====== ​Permalinks ​======+====== ​Custom Permalink Structure ​======
  
-Create custom permalinks via the **Settings** tab in your GetSimple installation. Permalinks help define the URL structure of your site. If you put a value in the **Custom Permalink Structure** input box, your FancyURL setting may be overridden by the string you put in.+Create custom permalinks via the **Settings** tab in your GetSimple installation. Permalinks help define the URL structure of your site. If you put a value in the **Custom Permalink Structure** input box, your [[pretty_urls|FancyURL]] setting may be overridden by the string you put in.
  
-The default URL structure for "​FancyURLs"​ ON is:+The default URL structure for **"​FancyURLs"​ ON** is:
 ''​%parent%/​%slug%/''​ ''​%parent%/​%slug%/''​
  
-The default URL structure for "​FancyURLs"​ OFF is:+The default URL structure for **"​FancyURLs"​ OFF** is:
 ''​index.php?​id=%slug%''​ ''​index.php?​id=%slug%''​
  
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 .html, .htm or .php extension to URLs =====
 +
 +If you want to add an extension (''​.html'',​ ''​.htm''​ or ''​.php''​) to your website'​s pages, you first need turn on **Use Fancy URLs**, then set the **Custom Permalink Structure** to (example for pages that will end in ''​.html''​):​
 +<​code>​%slug%.html</​code>​
 +
 +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_-]+)\.html$ index.php?​id=$1 [QSA,​L]</​code>​
 +
 +NOTE: Change ''​.html''​ to ''​.php''​ (or ''​.htm''​) in both the Rewrite Rule above and the permalink structure, if you are using that extension instead.