admin管理员组文章数量:1289901
Trying to remove "/index.php/" from URL,
The .htaccess file location is
./var/www/html/.htaccess
and the content
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php/$1 [L]
</IfModule>
however it doesn't work, accessing a web page is possible only with "/index.php/".
Trying to remove "/index.php/" from URL,
The .htaccess file location is
./var/www/html/.htaccess
and the content
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php/$1 [L]
</IfModule>
however it doesn't work, accessing a web page is possible only with "/index.php/".
Share Improve this question edited Jul 8, 2021 at 15:52 fuxia♦ 107k38 gold badges255 silver badges459 bronze badges asked Jul 8, 2021 at 15:21 WindowsWindows 11 silver badge4 bronze badges2 Answers
Reset to default 0Go to Settings >Permalink Settings.
Check Post name
Click on Save Change button.
And this should be the default htaccess. WordPress can manage it's own htaccess so no need to manually add htaccess rules. I would delete your htaccess file and then save permalink settings.
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Problem is solved by changing the following line inside "httpd.conf" file:
AllowOverride None
to
AllowOverride All
本文标签: permalinksindexphp in URL
版权声明:本文标题:permalinks - index.php in URL 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741453494a2379620.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论