Please or Register to create posts and topics.

Error 500 with wpml plugin

Hi,

I’ve just installed Asgaros forum on my website, which runs with the wpml plugin too, and I got an error 500 when I visit page on other language than the main one.

It seems that Asgaros modify the .htaccess each time a page is load and change it according to the wpml language.

.htaccess before :

RewriteEngine On
RewriteBase /project/name/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /project/name/index.php [L]

.htaccess after :

RewriteEngine On
RewriteBase /project/name/en/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /project/name/en/index.php [L]

If I visit a spanish page, ‘es’ is add on the .htaccess, and so on… It results in an error 500.

Is this the normal behaviour of Asgaros ?

 

Thanks,

Thomas

Hello @thomas-b

Asgaros Forum does not make any changes to the .htaccess on your server. Please have a look into your other plugins – especially WPML. I guess that WPML is adding those .htaccess adjustments automatically based on certain conditions.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Thanks for the reply, I will look at this.

Got an answer from the wpml plugin. Maybe Asgaros plugin call flush_rewrite_rules(true) too many times ?

=> https://wpml.org/errata/htaccess-is-rewritten-with-language-folder/

 

Hello again @thomas-b

Usually Asgaros Forum makes exactly one call to the flush_rewrite_rules(false) function in case that the rewrite-rules are missing. In your case it seems that a component is removing/manipulating the rewrite-rules set by Asgaros Forum so that this function is called again. This can be caused by a conflict in combination with WPML or by a complete other extension as well.

Have you tried to use the workaround-code in the link you posted?

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Yes, the workaround code works as expected. I just wanted to warn you about this possible issue.

Thomas