admin管理员组文章数量:1332404
Permalink to products and post of my website getting 404 error. after saving the permalink type in Setting -> Permalink page they will work correctly. But if I refresh the links they get 404 error again. Actually the links work only once.
this is my .htaccess file:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^.*-(\d+)/$ securityl/index\.php?id=$1&%{QUERY_STRING} [L]
RewriteRule ^.*-y(\d+)/$ securityl/index\.php?cat=$1&%{QUERY_STRING} [L]
RewriteRule ^.*(website[a-z]+map\.xml)$ websiteguide/$1 [L]
RewriteBase /
</IfModule>
I have changed the theme to store front and it's not working.
Permalink to products and post of my website getting 404 error. after saving the permalink type in Setting -> Permalink page they will work correctly. But if I refresh the links they get 404 error again. Actually the links work only once.
this is my .htaccess file:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^.*-(\d+)/$ securityl/index\.php?id=$1&%{QUERY_STRING} [L]
RewriteRule ^.*-y(\d+)/$ securityl/index\.php?cat=$1&%{QUERY_STRING} [L]
RewriteRule ^.*(website[a-z]+map\.xml)$ websiteguide/$1 [L]
RewriteBase /
</IfModule>
I have changed the theme to store front and it's not working.
Share Improve this question asked Jul 6, 2020 at 19:42 ErfanErfan 11 bronze badge1 Answer
Reset to default 0I realized that some php code changes the content of .htaccess
file. The php folder was in a directory named 'securityl'. I've been removed that directory but whenever the website was refreshing the directory and also the php files inside it was recreating. In the end I discovered that some code in wp-include/load.php
is creating the directory and I re-downloaded the wordpress and replaced the clean wp-include, then the problem solved and there was no code for creating securityl folder! . I don't know how and why the contents of that files were changed.
本文标签: permalinksWoocommerce posts and products links works only once and then get 404 error
版权声明:本文标题:permalinks - Woocommerce posts and products links works only once and then get 404 error 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742279298a2445793.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论