Can't Create a /blog URL

Web hosting discussion, programming, and shared and dedicated servers.
2 posts Page 1 of 1
by Czenko » Mon Sep 05, 2016 5:36 pm
I am in the process of building a website using Craft CMS, but it's requiring me to link using /index.php. For instance, linking to /blog just creates a 500 error; I can only get to the blog using /index.php/blog. Even setting up redirects does not help.

I've followed all the steps in this Craft Support article up to the last, which says:
If you're on Apache, your httpd.conf file probably has AllowOverride None set for your site, effectively disabling all .htaccess file changes. Change it to AllowOverride All, restart Apache and you should finally be set.
This part, I don't have control over, but I don't think it's set to AllowOverride None, since my .htaccess file is able to control the PHP verison.

Are there any steps I can take to prevent broken links all over the site?
by joemuller » Tue Sep 06, 2016 6:51 pm
I took a few minutes to look over your site and the linked documentation for Craft. In your case, it looks like the rewrite is getting set back again by Craft - it hasn't been told to leave the index.php part out of links, so every time you click to another page, it does the 'ugly' version instead of the 'pretty' one without index.php in the middle of it.

According to their documentation, you need to add the following to the config:
You can tell Craft not to include the “index.php” by opening up craft/config/general.php, and adding this to the array:

Code: Select all

'omitScriptNameInUrls' => true,
I'm a proud employee of Sonic.net! :-)
2 posts Page 1 of 1

Who is online

In total there are 36 users online :: 0 registered, 0 hidden and 36 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 36 guests