Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi,

I have a site which I've tried to convert to use pretty URLs. I'm having an issue with the links for the clonable pages. I have a template called menu-list and I use the pages tag and the masterpage attribute to write out a navigation on various pages using the following code:

Code: Select all
<cms:pages masterpage='menus-list.php'>
    <dd<cms:if k_page_title == current_page> class="current"</cms:if>><a href="<cms:show k_page_link />" title="<cms:show k_page_title />"><cms:show k_page_title /></a></dd>
</cms:pages>


When not using Pretty URLs, the URLs read out like the following and work fine:
http://www.mysite.net/menus-list.php?p=70

When I enable pretty URLs and load up the gen_htaccess.php I get the follwing code for the menus-list.php:

Code: Select all
#menus-list.php
RewriteRule ^menus-list$ "$0/" [R=301,L,QSA]
RewriteRule ^menus-list/$ menus-list.php [L,QSA]
RewriteRule ^menus-list/.*?([^\.\/]*)\.html$ menus-list.php?pname=$1 [L,QSA]
RewriteRule ^menus-list/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ menus-list.php?d=$1$2$3 [L,QSA]
RewriteRule ^menus-list/[^\.]*?([^/\.]*)/$ menus-list.php?fname=$1 [L,QSA]
RewriteRule ^menus-list/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]


When I then fire up the same menu the URLs read out as, e.g.:
http://www.mysite.net/menus-list/menu1.html

..where 'menu1' is the unique title, however when you click on it the actual URL it redirects to the same URL for all of the navigation options:
http://www.mysite.net/menus-list/

Can you let me know if it's possible to do what I'm doing and if so how it can be done.

Thanks
Darren
What you are trying to accomplish is definitely possible. It would help knowing what type of http status code you receive when you try visit a cloned page with pretty urls enabled. You could find out with your browser's web developer console or use a tool like this: http://www.seoconsultants.com/tools/headers-batch. Nevertheless, it is intriguing that your cloned pages worked just fine without pretty urls. That would seem to indicate there is nothing wrong with your menus-list.php coding. Are you using the following technique to display the cloned pages?
Code: Select all
<cms:if k_is_page>...</cms:if>
Lastly, did you place the menus-list.php htaccess code in the same template order as generated by gen_htaccess.php?
2 posts Page 1 of 1