如何从我的URL系统中删除index.php

时间:2019-12-01 13:26:46

标签: wordpress .htaccess url

我有一个网站。我用新的URL重新排列了主导航菜单。但是,我不能使用它们...因为当我打开一个称为“关于”的新页面时,结果就像root / index.php / about而不是root / about。

I tried these codes in my .htaccess file:

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

# END WordPress

# php -- BEGIN cPanel-generated handler, do not edit
# “ea-php72” paketini varsayılan “PHP” programlama dili olarak ayarlayın.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit


And this one was the original:

# 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

# php -- BEGIN cPanel-generated handler, do not edit
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

工作网址示例:https://www.fitpandas.net/index.php/schedule/ 目标网址示例:https://www.fitpandas.net/schedule/

我该怎么办,您能举个例子吗?

0 个答案:

没有答案
相关问题