Bonjour,
Voilà je voudrais utiliser des URLs du genre :
monsite.com/post/36/la-soupe-aux-choux
mais j'ai pas trouvé d'extension potable ni quoi que ce soit
Vous connaissez un truc ?
Page 1 of 1
un conseil pour des URLs que google adore ?
#1
Posted 12 May 2012 - 01:49 PM
And [for] their saying, "Indeed, we have killed the Messiah, Jesus, the son of Mary, the messenger of God ." And they did not kill him, nor did they crucify him; but [another] was made to resemble him to them. And indeed, those who differ over it are in doubt about it. They have no knowledge of it except the following of assumption. And they did not kill him, for certain.Rather, God raised him to Himself.
#2
Posted 27 May 2012 - 09:20 AM
Finalement on peut très bien s'en sortir avec la classe par défault de Yii:
fichier config/main.php:
fichier config/main.php:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'<controller:\w+>/<action:page>/<view:.+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>/<id:\d+>/<title:.+>'=>'<controller>/<action>',
'<controller:\w+>/<id:\d+>/<title:.+>'=>'<controller>',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
...
And [for] their saying, "Indeed, we have killed the Messiah, Jesus, the son of Mary, the messenger of God ." And they did not kill him, nor did they crucify him; but [another] was made to resemble him to them. And indeed, those who differ over it are in doubt about it. They have no knowledge of it except the following of assumption. And they did not kill him, for certain.Rather, God raised him to Himself.
#3
Posted 12 July 2012 - 02:25 AM
saegeek, on 27 May 2012 - 09:20 AM, said:
Finalement on peut très bien s'en sortir avec la classe par défault de Yii:
fichier config/main.php:
fichier config/main.php:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'<controller:\w+>/<action:page>/<view:.+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>/<id:\d+>/<title:.+>'=>'<controller>/<action>',
'<controller:\w+>/<id:\d+>/<title:.+>'=>'<controller>',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
...
merci pour l'info mais ton code ne fonctionne que si
'showScriptName'=>'true'
ou
'showScriptName'=>'false' avec un .htaccess qui 'masque' index.php
soit par exemple
Quote
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
have fun!
Share this topic:
Page 1 of 1

Help













