Jump to content

{Solved} CMS url rewrite problem (page not found)


Recommended Posts

Hi,

I have some problems with cms pages with url rewriting. Other pages work fine.

Basically all pages open from any page except cms pages.

 

For example:

If I click "Terms and conditions" it will open, but if I click that same page again it will give me the "page not found" error.

 

I also noticed that link sometimes shows www.mydomain/content/cms.php....and sometimes without content

 

Anyway the site is here www.hribitec.com

 

Test the cms footer links and you will see what I˙m talking about.

 

prestashop version 1.4.4.1

 

also when logging to BO, I get this notice that my shop is connected to the following domain name: shop.hribitec.com, which was my previus adress,

altough I changed the two entries in DB in ps_configuration.

Should I change somwhere else.

 

shz-forum1.jpg

Edited by amnesiak (see edit history)
Link to comment
Share on other sites

Here is code of a (modified) working modules/tmfooterlinks/tmfooterlinks.tpl

<div id="tmfooterlinks">
<div>
 <h4>{l s='Information' mod='tmfooterlinks'}</h4>
 <ul>
  <li><a href="{$link->getPageLink('contact-form.php', true)}">{l s='Contact' mod='tmfooterlinks'}</a></li>
  <li><a href="../cms.php?id_cms=1">{l s='Delivery' mod='tmfooterlinks'}</a></li>
<!--   <li><a href="../cms.php?id_cms=2">{l s='Legal Notice' mod='tmfooterlinks'}</a></li>
-->   <li><a href="../cms.php?id_cms=3">{l s='Terms and conditions' mod='tmfooterlinks'}</a></li>
  <li><a href="../cms.php?id_cms=4">{l s='About us' mod='tmfooterlinks'}</a></li>
 </ul>
</div>
<div>
 <h4>{l s='Our offers' mod='tmfooterlinks'}</h4>
 <ul>
  <li><a href="{$link->getPageLink('new-products.php', true)}">{l s='New products' mod='tmfooterlinks'}</a></li>
  <li><a href="{$link->getPageLink('best-sales.php', true)}">{l s='Top sellers' mod='tmfooterlinks'}</a></li>
  <li><a href="{$link->getPageLink('prices-drop.php', true)}">{l s='Specials' mod='tmfooterlinks'}</a></li>
<!--   <li><a href="{$link->getPageLink('manufacturer.php', true)}">{l s='Manufacturers' mod='tmfooterlinks'}</a></li>
  <li><a href="{$link->getPageLink('supplier.php', true)}">{l s='Suppliers' mod='tmfooterlinks'}</a></li>
-->  </ul>
</div>
<div>
 <h4>{l s='Your Account' mod='tmfooterlinks'}</h4>
 <ul>
  <li><a href="{$link->getPageLink('my-account.php', true)}">{l s='Your Account' mod='tmfooterlinks'}</a></li>
  <li><a href="{$link->getPageLink('identity.php', true)}">{l s='Personal information' mod='tmfooterlinks'}</a></li>
  <li><a href="{$link->getPageLink('addresses.php', true)}">{l s='Addresses' mod='tmfooterlinks'}</a></li>
  <li><a href="{$link->getPageLink('discount.php', true)}">{l s='Discount' mod='tmfooterlinks'}</a></li>
  <li><a href="{$link->getPageLink('history.php', true)}">{l s='Order history' mod='tmfooterlinks'}</a></li>
 </ul>
</div>
<p><h3>{l s='PrestaShop by' mod='tmfooterlinks'} <a href="http://www.eTiendas.co">eTiendas.co</a>. Get your PrestaShop NOW!</h3></p>
</div>

 

as for your domain notice, it's because your http host name is not prefixed with www, but your shop name in preferences-->seo urls--> is prefixed with www.

  • Like 1
Link to comment
Share on other sites

Thank you elpatron.

I edited those footer links manually as I want them to be in specific order.

I will try your code. I already tried the line for contact form and it works fine. I try the rest later.

Best regards

Link to comment
Share on other sites

Hi,

I managed to fix url rewriting in those footer links. Thank you for the code..

 

I still have one problem with url rewriting. When I click PayPal icon on the right side I`m taken to "What is PayPal" page. From there I also get "page not found" on all my footer links. I think I got that error even before, when url rewriting was not selected.

 

The paypal module was updated and it is not from version 1.4.4.1 (I downloaded the latest from prestashop modules page), as it did not work.

Link to comment
Share on other sites

try this:

 

change links like this:

<li><a href="../cms.php?id_cms=1">{l s='Delivery' mod='tmfooterlinks'}</a></li>

to

<li><a href="../../cms.php?id_cms=1">{l s='Delivery' mod='tmfooterlinks'}</a></li>

 

i.e. the footer link as coded before didn't back up the directory level after the current uri was in modules...

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
  • 7 months later...
  • 1 year later...

Hello. I have a Prestashop 1.5.4 and I had problem with most CMS pages, but without the ones that had sub-categories. So, I found I probably once made a mistake when accidentally changing the paths in Preferences -> SEO&URL, I had in CMS page path: {rewrite}-{id} and it should be: {rewrite}-{id}/ so it just needed to be with slash. So, you have to always remember about the default SEO settings before making changes. ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...