Answer the question
In order to leave comments, you need to log in
Why does the rule in urlManager not work?
I make a sitemap, created a rule: 'sitemap.xml'=> array('sitemap/index', 'urlSuffix' => ''), if I go to site.com/sitemap.xml, then nothing in response, I get only a string like: "This XML file does not appear to have any style information associated with it. The document tree is shown below." It doesn't reach my controller and the view, what's wrong?
Here is the urlManager code:
'urlManager'=>array(
'class'=>'DLanguageUrlManager',
'urlFormat' => 'path',
'showScriptName'=>false,
'urlSuffix' => '',
'rules'=>array(
'sitemap.xml'=> array('sitemap/index', 'urlSuffix' => ''),
'page/<id:\d+>/<alias:.*>/<platform:.*>' => 'page/index/',
'page/<id:\d+>/<alias:.*>' => 'page/index/',
'page/<id:\d+>' => 'page/index/',
'page' => 'page/index/',
'review/<id:\d+>/<alias:.*>' => 'review/index/',
'review/<id:\d+>' => 'review/index/',
'<controller:\w+>/<id:\d+>' => '<controller>/index',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
),
),
Answer the question
In order to leave comments, you need to log in
Is there a sitemap.xml file in the web folder by any chance? :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question