Jim M Posted December 20, 2021 Posted December 20, 2021 Could you please provide the image/video you're attempting to share? Looking at your posting settings, it does look like you're restricting a lot of URLs. pequeno 1
pequeno Posted December 20, 2021 Author Posted December 20, 2021 29 minutes ago, Jim M said: Could you please provide the image/video you're attempting to share? Can you specify a little more? I do not understand what I should share.
Jim M Posted December 20, 2021 Posted December 20, 2021 5 minutes ago, pequeno said: Can you specify a little more? I do not understand what I should share. Sorry, the image/video URL which you're attempting to share/embed here that the error you mentioned comes from. Lidia and pequeno 1 1
pequeno Posted December 20, 2021 Author Posted December 20, 2021 1 hour ago, Jim M said: Sorry, the image/video URL which you're attempting to share/embed here that the error you mentioned comes from. Thanks Jim M. No error. Simply that the redirects do not remove index.php in the url as I indicated in my first post.
pequeno Posted December 20, 2021 Author Posted December 20, 2021 2 hours ago, Jim M said: Could you please provide the image/video you're attempting to share? Any Youtube Video, for example this: And any image. This error is only with this code in htaccess RewriteCond %{THE_REQUEST} \ /(.+/)?index\.([^/]+)(\?.*)?\ [NC] RewriteRule ^(.+/)?index\.([^/]+)$ /%1 [NC,R=301,L] That works for remove index.php in the URL, but create problems embed videos and images: Quote The link could not be embedded because of an unexpected error: forbidden. The CSRF protection key did not match. This may indicate a plugin or theme is out of date. Please contact technical support for more information.
Marc Posted December 21, 2021 Posted December 21, 2021 14 hours ago, pequeno said: Any Youtube Video, for example this: And any image. This error is only with this code in htaccess RewriteCond %{THE_REQUEST} \ /(.+/)?index\.([^/]+)(\?.*)?\ [NC] RewriteRule ^(.+/)?index\.([^/]+)$ /%1 [NC,R=301,L] That works for remove index.php in the URL, but create problems embed videos and images: If its only when you have that in the code, you would need to remove it, as that isnt our code there. I have added notes to this ticket so we can get clarification from our developers on whether or not it should be redirecting when visiting index.php directly pequeno 1
pequeno Posted December 21, 2021 Author Posted December 21, 2021 38 minutes ago, Marc Stridgen said: If its only when you have that in the code, you would need to remove it, as that isnt our code there. I have added notes to this ticket so we can get clarification from our developers on whether or not it should be redirecting when visiting index.php directly Thank you. Because the real problem is the redirection of index.php with your code. Can I add my redirects to htaccess now? It seems that this does not affect your code.
pequeno Posted December 25, 2021 Author Posted December 25, 2021 Hello. Using thus code: RewriteRule (.*) /index.php/$1 [L] instead of: RewriteRule . /index.php [L] It seems to work correctly removing index.php and I don't get the error: Quote The link could not be embedded because of an unexpected error: forbidden. The CSRF protection key did not match. This may indicate a plugin or theme is out of date. Please contact technical support for more information. Now, the code in htaccess is. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) /index.php/$1 [L] I will verify that it does not give problems and I will keep you informed.
pequeno Posted January 9, 2022 Author Posted January 9, 2022 (edited) On 12/25/2021 at 1:24 AM, pequeno said: Hello. Using thus code: RewriteRule (.*) /index.php/$1 [L] instead of: RewriteRule . /index.php [L] It seems to work correctly removing index.php and I don't get the error: Now, the code in htaccess is. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) /index.php/$1 [L] I will verify that it does not give problems and I will keep you informed. Sorry! After checking a few days, don´t remove index.php from my URL 1 minute ago, pequeno said: Sorry! After checking a few days, don´t remove index.php from my URL On 12/21/2021 at 11:46 AM, Marc Stridgen said: If its only when you have that in the code, you would need to remove it, as that isnt our code there. I have added notes to this ticket so we can get clarification from our developers on whether or not it should be redirecting when visiting index.php directly Please, can you check it ? Thanks. Edited January 9, 2022 by pequeno
Marc Posted January 10, 2022 Posted January 10, 2022 As mentioned, I have added notes to this ticket for a developer to review for you
Management Solution Matt Posted January 13, 2022 Management Solution Posted January 13, 2022 I'm reviewing this for you. I would suggest restoring the default .htaccess file which can be downloaded via ACP > Search Engine Optimisation > Friendly URLs (the link is in the description of the setting 'Rewrite URLs'.invisioncommunity.com/ and invisioncommunity/index.php will both load without a redirect. The htaccess file looks for files that do not exist and rewrite based on that. index.php does exist, so this will not be rewritten or redirected.https://invisioncommunity.com/forums/index.php is not a real page and there is not a friendly routing path of that specific URL. /forums/ is a "fake" directory itself. Likewise https://invisioncommunity.com/forums/topic/index.php is not a real page and will result in an error page. I think the software is working as expected for you.
Recommended Posts