小编Rah*_*war的帖子

如何从WordPress站点URL中删除index.php

我的WordPress网站上的index.php有问题.这个问题来了,因为我已经更改并将我的WordPress数据库从WordPress迁移到mydatabase.我也改变了我的表前缀名称.

现在的问题是,我无法看到我的页面和帖子index.php.

http://example.com/index.php/postname/

我尝试了以下解决方案:

  1. 更改永久链接设置(没有更改).

  2. 使用.htaccess文件更改重写模块(没有更改).

  3. 在我的apache2服务器中启用重写模块(没有任何反应).

  4. 为缓存目的删除了wp_options表的rewrite_module值(没有发生).

  5. 如果我为%postname设置永久链接%

例如http://example.com/postname/

然后我得到404错误.

我的.htaccess代码是:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
Run Code Online (Sandbox Code Playgroud)

请有人给我正确的解决方案.怎么摆脱index.php

php mysql apache wordpress .htaccess

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

.htaccess ×1

apache ×1

mysql ×1

php ×1

wordpress ×1