How to change canonical URL?

Permalink
Hi!

Right now, my files are in the public_html folder under the concrete folder. So, the canonical URL iswww.www.bitter-gourd.org/index.php/...

How do I change that so the canonical URL ishttp://www.bitter-gourd.org? (without the index.php) For example, how should I get the About page to show up bitter-gourd.org/about instead of bitter-gourd.org/index.php/about?

Thanks beforehand!

Mochi

mochi
View Replies: View Best Answer
madeforspace replied on at Permalink Best Answer Reply
madeforspace
Hi

You need to enable Pretty URL's via the dashboard of C5 in Sitewide Settings.
Tick the box marked enable Pretty URL's and copy the code provided in to your .htaccess file in your root on your server.
That will remove the /index.php/ from your URL's.

Hope that helps
mochi replied on at Permalink Reply
mochi
Thank you so much madeforspace! It worked perfectly and your explanations were so easy to follow.

Thanks for helping a beginner!
Mochi
cubewebsolutions replied on at Permalink Reply
Hi, I've changed my .htaccess file so it includes the required coding, and I've enabled pretty urls, but all the links around my site still include the /index.php/ part and when clicked these still show up in the address bar like this:

http://yoursanctuary.com.au/index.php/beauty/...

However, when I remove the /index.php portion of the links in the address bar, the correct page still loads, i.e.

http://yoursanctuary.com.au/beauty/...

So how do I get the link around my site including the nav menu to not have the index.php part.

ps.. I have already cleared the cache.
madeforspace replied on at Permalink Reply
madeforspace
I had a quick look at your site.
I see you have a drop down nav, which I don't think is the Superfish one, could be wrong.
When I inspected the elements for the nav all the li entries have the full URL included.
You could try checking the page properties for all pages and seeing if they still have the index.php in them, if so you can remove this part and the pages should sill work if you have pretty URL's enabled.

Hope that helps
cubewebsolutions replied on at Permalink Reply
I've had a look in the page properties, and the setup looks like the pic here:http://bit.ly/I47w2e

I've just taken over this cms from the previous admin ... so just finding my feet with it. As I said, I've got the pretty urls turned on, and I've put the coding into the .htaccess file okay.

All pages work when I remove the /index.php/ portion of the url in the address bar... ALL except one.. which is :

http://www.yoursanctuary.com.au/index.php/packages/...

If I remove /index.php from that, it gives an error, but all other pages work....
madeforspace replied on at Permalink Reply
madeforspace
Is the drop down nav a custom build? Were the links hand coded into it?
The system is set correctly as the pretty URL's work but I have found on other sites that if links have been hand coded in then they wont change if you update the pretty URL's.
You could also check if the nav is being pulled from a scrapbook or stack and maybe that version is holding on to the index.php part.