Pretty URLs

Permalink
Hi everyone

OK, enabled pretty urls in the dashboard, added script to the .htaccess file, checked with the host that their end is all set up which they assure me it is yet when I click a link within the site the link is "missing"???
If I add the /index.php/ section in where it normally would be the page opens perfectly so something is missing somewhere along the line.
I opened my error log on and found the following entry:

"Premature end of script headers: index.php"

Does this mean anything to anyone? if so, some help in rectifying would be great as I have 10 sites on the same host having the same issue so it would be cool to get it sorted :)

Thanks for your time.

DigitalCrate
 
jva1601 replied on at Permalink Reply 1 Attachment
jva1601
The way I solved mine using information I got from this forum was I had to do this.

Since I am running this website as a virtual host with PHP FCGId (run as virtual server owner) wrapper script. I first had to find the path to my php.ini. I did this by creating a file within the root directory of my concrete5 website which I named as info.php. Within this file I placed:

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

?>

Looking at the part where it says "Loaded Configuration File" shows the path to my php.ini

Then.

In my php.ini file I had to change the value to:

cgi.fix_pathinfo = 0

Then I had to restart the web server. After that pretty URL works.

Then delete the file info.php.

This is why I prefer to do my own hosting so I can have complete control on my server. I have a Concrete5 web site which I am now running in Amazon's cloud. Very easy to setup. Plus I use Virtualmin GPL as a cpanel to manage my virtual websites. Another great free Open Source tool.
nteaviation replied on at Permalink Reply
nteaviation
I read somewhere you can put this in your .htaccess:

php_flag cgi.fix_pathinfo 0

I have never tried it but it may work in some situations :)
DigitalCrate replied on at Permalink Reply
DigitalCrate
Thanks to you both for your time in answering my issue, I'll take a look into your solutions and let you know how it goes.
webinstinct replied on at Permalink Reply
webinstinct
Thank you! That fixed it for me too. As a note, our servers allow you to place a php.ini file inside any folder, which overrides the default php.ini on the system. This functionality (on our servers) is NOT recursive, so it would become ungainly in a deep standard site. But with C5, everything runs through the root, so one install of that php.ini works great. Not sure if that helps others - perhaps their servers are set up that way as well.

One other note: bear in mind that C5 overwrites the htaccess file when you toggle pretty URLs on and off. So if you add the htaccess line (per above) then change the pretty URL settings ever, you will lose that line and your site will break. That's why I went the php.ini route.

Thanks again! Big help over here!
nteaviation replied on at Permalink Reply
nteaviation
I'm not sure that is true about re-writing .htaccess. From the Dashboard/Site Settings:
"Required Code
You must copy the lines of code below and place them in your server's configuration file or .htaccess file."

It may very well rewite .htaccess on a new install though.
DigitalCrate replied on at Permalink Reply
DigitalCrate
Hey

Found this after 2 hours of fiddling about but this works perfectly, only not too sure why haha

http://www.concrete5.org/community/forums/installation/no_input_fil...