0

We are converting an exisiting HTML site into a CMS using CakePHP. Since SEO of the site has been mapped with keywords and indexed by Google the static pages i want to have urls to have the extention .html

I had a look at the Document here

But am not quite sure how to achieve this in the right way.

Any one who has worked on it can give some pointers?

1

1 Answer 1

2

simply put this line into your Router Router::parseExtensions('html');

This will tell the Router to cut off the .html as an Extension and parse what remains. To Create correct Links to the Pages you have to give the Link() function another Parameter called "ext".

Like this:

$this->Html->link(
   'Super Seo link',
   array(
       'controller' => 'anyController',
       'action' => 'someAction',
       'title' => 'seo-title-for-gods-sake',
       'ext' => 'html'
   )  );

Have fun! Florian

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.