I have pretty urls enabled and have set my canonical url.
Putting canonical/index.php in browser gets rewritten to canonical/ which is fine. If i put canonical/index.html it does not get rewritten and I get a 404 page.
The rewrite rule only kicks in if the index.html file doesn’t exists. If you have index.html, you’ll return that static page.
But in your case, you don’t have that file, so it’s going to fall to the final RewriteRule, which puts the request through Concrete. And Concrete isn’t going to find a page that has a slug of index.html, so returns a 404 response.
I just want the url to go to canonical for /index.html
also I want to ensure search engines only find the canonical domain and not /index.php to prevent duplicate content. So I am trying to have the correct rules in my .htaccess to prevent that.
This works for index.html and I can still get to the login interface. Thank you.
From what I can see its not possible to make index.php go to / without breaking the cms interface. So in respect of google seeing duplicate urls for index.php and / I think its best to let link rel=“canonical” tell Google which is the url to choose.