Jump to content
This topic contains 36 posts. A summary containing the most significant posts is available

Featured Replies

  • Community Expert

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.

  • Author
 

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.

  • Community Expert
 

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.

  • Author
 

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.

  • Author
 

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.

 

  • Community Expert
 

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

  • Author
 

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.

  • Author

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.

  • 3 weeks later...
  • Author
 

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

 

Sorry! After checking a few days, don´t remove index.php from my URL

 

 

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 by pequeno

  • Community Expert

As mentioned, I have added notes to this ticket for a developer to review for you

  • Community Expert
  • Management
  • Solution

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.

Recently Browsing 0

  • No registered users viewing this page.