Hi all! My first post here.
I’ve got a tiny Yii project going, and trying to use the NLessController extension, which allows you to use LessCSS or SASS files for stylesheets.
I got the extension working but only when in the default URL mode. However, when I activate path-format URLs by uncommenting:
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
in config/main.php, the plugin stops working.
I believe it’s to do with the .htaccess rewrite rules. Which looks as follows:
# Place this file in the root of the app
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} ^.*\.(less|sass|scss)$
RewriteRule (.*) index.php?r=nless/index&f=$1&%{QUERY_STRING} [L]
# 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
#or simply:
# RewriteRule ^.*$ /index.php [L]
Can anyone offer some advice as to how the rules should be modified to accomodate path-format URLs?