我在 SO 上看到过一些关于这个问题的其他帖子,但是建议的解决方案都不适合我,所以我重新发布。
将我的永久链接结构更改为/%postname%/
,所有链接均无效。我得到以下 404 信息:
Not Found
The requested URL /my-post-name/ was not found on this server.
Apache/2.2.20 (Ubuntu) Server at mysite.com Port 80
当我回到default
永久链接结构它再次开始工作,但我想要/%postname%/
无论如何结构。
My .htaccess
file's chmod
is 777.
将我的永久链接结构更新为/%postname%/
, the .htaccess
Wordpress生成的文件如下:
# 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
有什么想法吗?
Edit:
我尝试将永久链接结构更改为以下内容:
/index.php/%postname%/
它很愉快地工作了。然而,现在的问题是,毫不奇怪,链接的形式如下:
www.mysite.com/index.php/my-page.com
我的问题是如何删除index.php
从我的链接。当我从永久链接结构中删除它时(即,/%postname%/
),我的链接不再有效。
PS:我不使用博客条目,而是仅使用网站中的页面。如果有必要,我的网站是:mll.sehir.edu.tr。