Note that there are some explanatory texts on larger screens.

plurals
  1. POYii index removal - what am I missing?
    primarykey
    data
    text
    <p>Here's my setup:</p> <p><strong>config.php</strong></p> <pre><code> 'urlManager'=&gt;array( 'urlFormat'=&gt;'path', 'rules'=&gt;array( '&lt;controller:\w+&gt;/&lt;id:\d+&gt;'=&gt;'&lt;controller&gt;/view', '&lt;controller:\w+&gt;/&lt;action:\w+&gt;/&lt;id:\d+&gt;'=&gt;'&lt;controller&gt;/&lt;action&gt;', '&lt;controller:\w+&gt;/&lt;action:\w+&gt;'=&gt;'&lt;controller&gt;/&lt;action&gt;' ), 'showScriptName'=&gt;false, ), </code></pre> <p><strong>.htaccess</strong>:</p> <pre><code>Options +FollowSymlinks #+FollowSymLinks must be enabled for any rules to work, this is a security #requirement of the rewrite engine. Normally it's enabled in the root and we #shouldn't have to add it, but it doesn't hurt to do so. RewriteEngine on #Apache scans all incoming URL requests, checks for matches in our #.htaccess file #and rewrites those matching URLs to whatever we specify. #allow blank referrers. RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?site.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?site.dev [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?dev.site.com [NC] RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,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 </code></pre> <p><strong>On layout menus I have this:</strong></p> <pre><code>$this-&gt;widget('zii.widgets.CMenu', array('items'=&gt; array( array( 'label'=&gt;Yii::t('site','A'), 'url'=&gt;array('/site/index') ), array( 'label'=&gt;Yii::t('site','Q'), 'url'=&gt;array('rooms/index') ), array( 'label'=&gt;Yii::t('site','G'), 'url'=&gt;array('gastronomy/index') ), array( 'label'=&gt;Yii::t('site','A'), 'url'=&gt;array('activity/index') ), array( 'label'=&gt;Yii::t('site','S'), 'url'=&gt;array('services/index') ), array( 'label'=&gt;Yii::t('site','C'), 'url'=&gt;array('contacts/index') ), array( 'label'=&gt;Yii::t('site','R'), 'url'=&gt;array('booking/index') ) ) ) ); </code></pre> <p>I explicit call index here, because it seems that, calling it explicitly is required.</p> <p>With this setup, each time I click on those links I get, for example:</p> <p><a href="http://site.dev/rooms/index" rel="nofollow">http://site.dev/rooms/index</a></p> <p>While I wish to get:</p> <p><a href="http://site.dev/rooms/" rel="nofollow">http://site.dev/rooms/</a></p> <p>W/out the index name.</p> <p>What am I missing here ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload