Not showing pages

Having problems installing Concrete CMS?

Hello, I have just moved a website with concrete from one server to another and pointed the domain, however only the homepage is showing and it is showing a 404 error for all the other pages.
I had updated the database details in the application/config/database.php file but its not working.

Can anyone give me some pointers on this?
I am also unable to log in to admin as i get the same error

Many thanks

You’re likely missing the .htccess file, which is needed to handle the ‘pretty’ urls.

If you grabbed the files via cPanel, the .htaccess file is often hidden by default, so you don’t spot it to include in a zip to transfer.

Thanks for this i’ll ask for the file to be sent over. Can i ask where will it sit when i upload it? will it be in the public folder base level?

HI @mesuva Apparently the .htaccess files are there. I have been advised to add the folowing code to them. I did that, cleared the cache and it made no difference.

heres the code

RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}/index.html !-f RewriteCond %{REQUEST_FILENAME}/index.php !-f RewriteRule . index.php [L]

will this fix it? any ideas?
Many thanks

That looks correct to me, here’s what I’d be using, formatted so we can see it on the forums:

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteBase /
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME}/index.html !-f
	RewriteCond %{REQUEST_FILENAME}/index.php !-f
	RewriteRule . index.php [L]

It does come down to the server type and configuration. The above is for Apache, but other webservers exist like nginx.

And sometimes even on Apache, it’s not configured correctly to have mod_rewrite enabled.

What happens if you view something like /contact, but forcibly make the url: /index.php/contact ?

Is this cPanel or something else?

Hi @mesuva , it works, heresd an example

what does this mean?

Many thanks

From what I can tell your webserver is running nginx, not Apache, so that would explain why the .htaccess file has no effect.

You’ll need to ask your host to add the following to the site’s configuration:

location / {
	try_files $uri $uri/ /index.php?$query_string;

thats great, i will do. many thanks @mesuva

Hi @mesuva

It errored when i did it
Parse error: syntax error, unexpected ‘{’ in /home/customer/www/ on line 5

I had added it the the index file was that right?

Ive just spoken to my server guitys and this is what theyve said

I’ve checked your account and I can see that you’re on a Cloud plan. All our servers are using Apache with an NGINX Direct delivery implementation.

Ive just disabled NGINX and will test it

No, that wouldn’t go in the index.php file, it’s something that is put in place in the nginx configuration.

But from what you’ve said about the server, it’s hard for me to tell if it’s needs the .htaccess file, or this nginx instruction.

Best to work with the server guys. They should be familiar with a common rewrite like this and how their server needs to handle it. If not, change hosts!

Thanks @mesuva
I have pased this to my server support to resolve as it seems a deeper problem than i can sort. Thanks for your help and i will update you once done.

Hi @mesuva ,

Fixed many thanks. Tech server support added the original code into .htaccess which i wasnt able to find. and its worked straght away.
Thanks for your time today, I really appreciate that.

The most likely reason why you could not see the htaccess file is because when in the cPanel File Manager, in the top right corner you should see a ‘Settings’ tab, click that and then tick the ‘Show Hidden Files (dotfiles)’
Screenshot is attached.
Screenshot 2024-04-04 170439