Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
DzUser Posted November 1, 2023 Author Posted November 1, 2023 11 minutes ago, Randy Calvert said: Make sure your conf_global.php reflects the correct URL. Afterwards, clear the system cache in the support section of your ACP. Yes, I modified my conf_global.php with the new URL (my test URL actually). I cleared the system cache but same result.
Randy Calvert Posted November 1, 2023 Posted November 1, 2023 Did you make sure you have a fresh .htaccess file uploaded?
DzUser Posted November 1, 2023 Author Posted November 1, 2023 51 minutes ago, Randy Calvert said: Did you make sure you have a fresh .htaccess file uploaded? No, I didn't uploed a new .htaccess, I use the old .htaccess. I need to create a new file ? I don't see any specific conf but may be I wrong : <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
teraßyte Posted November 1, 2023 Posted November 1, 2023 You're missing a couple of rows. The latest .htaccess for 4.7 is this one: <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> Re-download the file from your ACP, or use paste the content above in it.
DzUser Posted November 2, 2023 Author Posted November 2, 2023 20 hours ago, teraßyte said: You're missing a couple of rows. The latest .htaccess for 4.7 is this one: <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> Re-download the file from your ACP, or use paste the content above in it. Done. But links still don't work. I still have "Not found" page. Actually, my test site is http://my_ip_address/forum_ips. There is a problem ? There is any hard link on DB may be ?
Jim M Posted November 2, 2023 Posted November 2, 2023 3 minutes ago, DzUser said: Done. But links still don't work. I still have "Not found" page. Actually, my test site is http://my_ip_address/forum_ips. There is a problem ? There is any hard link on DB may be ? Based on what I am seeing on your community, the .htaccess needs to be completely replaced as our software is now in a folder which is not contained in the lines present, thus it is creating a 404. DzUser 1
teraßyte Posted November 2, 2023 Posted November 2, 2023 Ah, yes. If the forum is in a folder the .htaccess above won't work (the one he posted didn't have a folder, either). It's best if you download the file again directly from the ACP. DzUser 1
DzUser Posted November 2, 2023 Author Posted November 2, 2023 (edited) 34 minutes ago, Jim M said: Based on what I am seeing on your community, the .htaccess needs to be completely replaced as our software is now in a folder which is not contained in the lines present, thus it is creating a 404. I do it, I replaced the .htaccess with the .htaccess file downloaded from ACP but still "Not found" page when I click on URLs. I put the .htacess on my IPB folder : /var/www/html/forum/.htaccess There is the .htaccess downloaded from ACP <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase /forum_ips/ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule \.(js|css|jpeg|jpg|gif|png|ico|map|webp)(\?|$) /forum_ips/404error.php [L,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /forum_ips/index.php [L] </IfModule> EDIT : I see an warning message on ACP : Edited November 2, 2023 by DzUser
Jim M Posted November 2, 2023 Posted November 2, 2023 You would need to ensure that you're using Apache and mod_rewrite is enabled on it. From the sounds of it, you have implemented .htaccess correctly so now it is just a server issue, I'm afraid. You would want to work with your hosting provider for assistance here.
DzUser Posted November 2, 2023 Author Posted November 2, 2023 30 minutes ago, Jim M said: You would need to ensure that you're using Apache and mod_rewrite is enabled on it. From the sounds of it, you have implemented .htaccess correctly so now it is just a server issue, I'm afraid. You would want to work with your hosting provider for assistance here. Yes, I confirm, mod_rewrite is enabled. I'm surprised if it's my Apache configuration or server. But for the warning message about .htaccess, it's normal ? The rewriting does not seem to be working. This may be because you have not uploaded the .htaccess file, but may be a false error if your community is not generally accessible. Check friendly URLs are working, and if they are not, ensure you have uploaded the .htaccess file correctly or contact technical support for assistance.
Jim M Posted November 2, 2023 Posted November 2, 2023 3 minutes ago, DzUser said: Yes, I confirm, mod_rewrite is enabled. I'm surprised if it's my Apache configuration or server. But for the warning message about .htaccess, it's normal ? The rewriting does not seem to be working. This may be because you have not uploaded the .htaccess file, but may be a false error if your community is not generally accessible. Check friendly URLs are working, and if they are not, ensure you have uploaded the .htaccess file correctly or contact technical support for assistance. That is not normal, no. That is an indication further that either the .htaccess is in the wrong spot (make sure it's in the folder you installed the software in) or something is wrong with mod_rewrite on your server. DzUser 1
DzUser Posted November 2, 2023 Author Posted November 2, 2023 13 minutes ago, Jim M said: That is not normal, no. That is an indication further that either the .htaccess is in the wrong spot (make sure it's in the folder you installed the software in) or something is wrong with mod_rewrite on your server. Yes, I'm sure. The software is installed on /var/www/html/forum_ips My .htaccess file is in root folder of community : /var/www/html/forum_ips/.htaccess The mod_rewrite seems to be good : [root@srv www]# httpd -M | grep rewrite rewrite_module (shared) I checked the Apache logs, there is no error. I continue to search
Randy Calvert Posted November 2, 2023 Posted November 2, 2023 Just because it’s installed on the server does not mean it’s available to the virtual host. You may need to enable it in httpd.conf. The module can be available to some, all, or none of the sites on the server. DzUser 1
DzUser Posted November 2, 2023 Author Posted November 2, 2023 (edited) Got it. @Jim M and @Randy Calvert you're right, it was mod_rewrite. I did two actions to URLs work finally : I modify, in httpd.conf, the AllowOverride directive from "None" to "All" . . . <Directory /var/www/html> . . . # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All . . . </Directory> . . . I create a .htaccess file on my Apache Document Root (/var/www/html) and I add this line RewriteEngine On I restarted Apache service and all works fine now. There is the link which help me : How To Set Up mod_rewrite for Apache on CentOS 7 | DigitalOcean Thanks a lot all guys for your precious help. I can now move forward for my migration. Edited November 2, 2023 by DzUser
Randy Calvert Posted November 2, 2023 Posted November 2, 2023 Awesome! I’m glad you got to the bottom of the issue! Good luck with the migration. DzUser 1
Recommended Posts