Friendly URLs 404 Error with PHP 7.4

dkraeer

Member
Guys

Maybe someone here can help. I recently upgraded to PHP 7.4 and since it no longer supports .htaccess files my host tried to convert the redirect to NGINX using code found in the Xenforo support doc here:

The code my host put in the .conf file is below with the install directory being /community/

All inks after the main forum pages are 404 errors.

Does anyone see anything wrong?

Thanks
Dave

location /community/ {
try_files $uri $uri/ /community/index.php?$uri&$args;
index index.php index.html;
}

location /community/install/data/ {
internal;
}

location /community/install/templates/ {
internal;
}
location /community/internal_data/ {
internal;
}
location /community/library/ { #legacy
internal;
}
location /community/src/ {
internal;
}

location ~ \.php$ {

try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
 
I recently upgraded to PHP 7.4 and since it no longer supports .htaccess files my host tried to convert the redirect to NGINX using code found in the Xenforo support doc here:

The code my host put in the .conf file is below with the install directory being /community/

All inks after the main forum pages are 404 errors.
Who told you PHP t.4 doesn't "support .htaccess files"? That's not correct.

It sounds like in addition to upgrading to PHP 7.4 you also switched from Apache to nginx.
 
I'm sorry, it is not that it does not support .htaccess my host(WP Engine) is deprecating the usage of .htaccess starting with 7.4. We tried to put in the NGINX redirect for friendly URLs and it is not working. So I am trying to see what is wrong with the code that we put in the .conf file.

 
If you aren't on nginx, those rules won't work.

if you're still on apache, you need to edit the virtual host file directly if they turned off htaccess (which while is more secure is quite stupid for a customer-centric server company and i'd recommend just moving to a more-qualifed provider who doesn't pull the rug out from your site...)

do a
Code:
locate httpd.conf
and it should get you in the right place.

if you are using a control panel, they may over-write this file and you'll need to use their include functionality instead. we'll need more details.
 
I'm sorry, it is not that it does not support .htaccess my host(WP Engine) is deprecating the usage of .htaccess starting with 7.4. We tried to put in the NGINX redirect for friendly URLs and it is not working. So I am trying to see what is wrong with the code that we put in the .conf file.

They're being disingenuous; for all intents and purposes it looks like they're going to be consolidating and moving away from Apache due to their acquisition of FlyWheel.
 
I have been using php 7.4 for the past year-plus, and have had zero issues with .htaccess files. I think it is more of a web server compatibility thing, and not a php thing.

Trust me, if php 7.4 / .htaccess compatibility were to be broken, half of the internet would be not working .....
 
This thread made me check my .htaccess having recently moved onto php7.4

I found a redirect missing which I was certain I had put in place, so good call none the less (y)
 
Back
Top Bottom