Table of Contents
- Bienvenue dans le Wiki
- Documentation en français
- Par où commencer
- Le panneau d'administration
- Tutoriel Création d'un module
- Trucs et astuces
- Glossaire CMSMS
- Guide du développeur
- Module Tutorial
- Création de modules
- Glossaire Wiki
This page in: English - Deutsch - Español - Français - Italiano - Lietuvių - Nederlands - Norsk - Polski - Русский - Svenska - Tiếng Việt - عربي - 日本語 简体中文
URLs "propres" (Pretty URL's) Pretty URL's A TRADUIRE
Pour CMSSMS
Voir aussi la page Paramètres optionnels
- CMS Made Simple 0.13 comes with support for Clean Hierachical URL's. If you put the following in a .htaccess file:
Options +FollowSymLinks RewriteEngine on # 301 Redirect all requests that don't contain a dot or trailing slash to # include a trailing slash RewriteCond %{REQUEST_URI} !/$ RewriteCond %{REQUEST_URI} !\. RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L] # Rewrites urls in the form of /parent/child/ # but only rewrites if the requested URL is not a file or directory RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ index.php?page=$1 [QSA]
- And change the relevent options in config.php
#Show mod_rewrite URLs in the menu? $config['assume_mod_rewrite'] = true; #Extension to use if you're using mod_rewrite for pretty URLs. $config['page_extension'] = '.html';
- You can have URLs like /parent/child/ instead of /index.php/parent/child/ or /index.php?page=child
Pour le module News (Articles)
- For NEWS-Module I had to create a subfolder /news and add a /news/.htaccess:
Options +FollowSymLinks RewriteEngine on RewriteBase / # Rewrite for NEWS # requested URL looks like /news/12/13.html rewrite is # index.php?mact=News,cntnt01,detail,0&cntnt01articleid=12&cntnt01returnid=13 # first number is article, second is returnid; NC = nocase, L=last (rule) RewriteRule ^([0-9]*).html$ index.php?mact=News,cntnt01,detail,0&cntnt01articleid=$1 [NC,L] RewriteRule ^([0-9]*)/([0-9]*).html$ index.php?mact=News,cntnt01,detail,0&cntnt01articleid=$1& cntnt01returnid=$2 [NC,L]
- One line for the rule!!
- The first rule is for request from "more..."-link, second rule is for RSS-Feed and searchresults by building search (both have no return-id).
This page in:
English -
Deutsch -
Español -
Français -
Italiano -
Lietuvių -
Nederlands -
Norsk -
Polski -
Česky -
Русский -
Svenska -
Tiếng Việt -
عربي -
日本語
简体中文