Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
I've set up a 'blog' type setup and installed the htaccess rules for prettification of the URLs.

I've now added some code to my template file so that I can have a list page as well as individual blog pages - as per the tutorial (I believe).

I have in my template file (https://my site dot com/mytemplate.php) this code (and some other code):

Code: Select all
<cms:if k_is_page>
    <!-- Show a single cloned page here e.g. -->
   
             <cms:show k_page_title/>
         <cms:if subtitle != ''>
              <br>
              <b style="font-size:18px; font-weight:inherit;">
         </cms:if>
         <cms:editable name='subtitle' type='text' label='Subtitle' search_type='text' order="2" />
         <cms:if subtitle != ''>
              </b>
         </cms:if>
        </h2>
... etc

<cms:else />
    <!-- Show a list of cloned pages here -->
     <cms:pages>
        <h2><cms:show k_page_title /></h2>
    </cms:pages>
</cms:if>



However, when I go to page:

https://my site dot com/mytemplate.php

I am redirected automatically to:

https://my site dot com/mytemplate/

Where there is on there server already some content (actually in https://my site dot com/mytemplate/index.php) - which is displayed instead of the list view.

Any way around that?

TY!
Hi,

https://my site dot com/mytemplate/ is the correct prettyURL for mytemplate.php.
However, if an actual physical folder named 'mytemplate' is present on the system, it also becomes the correct URL for that folder (i.e the two will clash) and the folder being 'real' will be given preference (as you see happening).

That is how prettyURLs work out-of-the-box, I am afraid.
You'll either need to change the template's name of that of the folder.
2 posts Page 1 of 1
cron