Genestoy Posted September 27, 2022 Share Posted September 27, 2022 I have this htaccess file in my IPS forums directory and checking to see if this is the correct code? I am running 4.7.2.1 with PHP 8.0 - just trying to clean things up a bit since my board has been running for 20 years now and may have some "stray" stuff lingering! Thanks #Use PHP5 Single php.ini as default #AddHandler application/x-httpd-php5s .php #AddType application/x-httpd-php .html <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] RewriteBase /forums/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /forums/index.php [L] </IfModule> Link to comment Share on other sites More sharing options...
Solution Marc Posted September 27, 2022 Solution Share Posted September 27, 2022 That isn't a standard one, no. You can get a standard htaccess from your admin CP by visiting System->Site Promotion->Search Engine Optimisation. You will see "Download this file" on that page Link to comment Share on other sites More sharing options...
Genestoy Posted September 27, 2022 Author Share Posted September 27, 2022 Thanks a bunch Marc! I downloaded the correct one and uploaded it to my directory. Seems all is well. Link to comment Share on other sites More sharing options...
bosss Posted September 27, 2022 Share Posted September 27, 2022 19 minutes ago, Marc Stridgen said: That isn't a standard one, no. You can get a standard htaccess from your admin CP by visiting System->Site Promotion->Search Engine Optimisation. You will see "Download this file" on that page I do not see that file to download? Sorry my mistake - found! Link to comment Share on other sites More sharing options...
Genestoy Posted September 27, 2022 Author Share Posted September 27, 2022 Friendly URL's tab> In the middle "download this file" bosss 1 Link to comment Share on other sites More sharing options...
Daniel F Posted September 27, 2022 Share Posted September 27, 2022 2 minutes ago, bosss said: I do not see that file to download? bosss 1 Link to comment Share on other sites More sharing options...
bosss Posted September 27, 2022 Share Posted September 27, 2022 (edited) @Daniel F Please some help - my htaccess is now like this RewriteEngine on RewriteCond %{HTTP_HOST} ^oldlibar\.website$ [OR] RewriteCond %{HTTP_HOST} ^www\.oldlibar\.website$ RewriteRule ^ipb46\/?$ "https\:\/\/www\.oldlibar\.website\/" [R=301,L] my what i download from my Admin cp is here <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule \.(js|css|jpeg|jpg|gif|png|ico|map|webp)(\?|$) /404error.php [L,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> How can make both in one or ...? regards Edited September 27, 2022 by bosss Link to comment Share on other sites More sharing options...
Marc Posted September 27, 2022 Share Posted September 27, 2022 You would add the bottom 3 lines of that top file, just below the "RewriteEngine on" part in the bottom if you wish to merge them. Note, we would not advise on any issues this may cause. We can assist only with the stock version, so this would be at your own risk. Link to comment Share on other sites More sharing options...
bosss Posted September 27, 2022 Share Posted September 27, 2022 @Marc Stridgen like here <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteCond %{HTTP_HOST} ^oldlibar\.website$ [OR] RewriteCond %{HTTP_HOST} ^www\.oldlibar\.website$ RewriteRule ^ipb46\/?$ "https\:\/\/www\.oldlibar\.website\/" [R=301,L] RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule \.(js|css|jpeg|jpg|gif|png|ico|map|webp)(\?|$) /404error.php [L,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Link to comment Share on other sites More sharing options...
Marc Posted September 27, 2022 Share Posted September 27, 2022 That would be the merging of those 2, yes bosss 1 Link to comment Share on other sites More sharing options...
bosss Posted September 27, 2022 Share Posted September 27, 2022 Done - no problems Link to comment Share on other sites More sharing options...
Jim M Posted September 27, 2022 Share Posted September 27, 2022 Glad to hear you're all set. bosss 1 Link to comment Share on other sites More sharing options...
savannahjan50 Posted December 5, 2022 Share Posted December 5, 2022 (edited) Does the most recent htaccess file override the php version set on your server? Our database is set to 8.0, but we have several htaccess files, the most recent showing php 7.1. It's time for an upgrade that requires php 8.0 and I want to prevent any conflicts before the upgrade. # Use PHP71 as default AddHandler application/x-httpd-php71 .php <IfModule mod_suphp.c> suPHP_ConfigPath /opt/php71/lib </IfModule> Edited December 5, 2022 by savannahjan50 Link to comment Share on other sites More sharing options...
Jim M Posted December 5, 2022 Share Posted December 5, 2022 12 minutes ago, savannahjan50 said: Does the most recent htaccess file override the php version set on your server? Our database is set to 8.0, but we have several htaccess files, the most recent showing php 7.1. It's time for an upgrade that requires php 8.0 and I want to prevent any conflicts before the upgrade. # Use PHP71 as default AddHandler application/x-httpd-php71 .php <IfModule mod_suphp.c> suPHP_ConfigPath /opt/php71/lib </IfModule> Please contact your hosting provider or server administrator for assistance with PHP issues. Link to comment Share on other sites More sharing options...
Recommended Posts