字preSS固定链接结构变化问题结构、链接、问题、preSS

2023-09-02 09:39:03 作者:任世间慌乱

我看到的SO其他一些职位对这个问题,对我来说却没有建议的解决方案中没有工作,所以我重新发布。

I have seen some other posts on SO about this issue, however none of the suggested solutions did work for me, so I repost.

改变我的永久链接结构,以 /%postname%/ 之后,没有一个环节的工作。我得到以下404:

After changing my permalink structure to /%postname%/, none of the links is working. I get the following 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

当我回到了默认固定链接结构再次开始工作,但我想有 /%postname%/ 结构反正。

When I get back to the default permalink structure it starts to work again, but I want to have /%postname%/ structure anyways.

我的的.htaccess 文件的搭配chmod 777

更新我的永久链接结构,以 /%postname%/ 后,由Word $ P产生的的.htaccess 文件$ PSS如下:

After updating my permalink structure to /%postname%/, the .htaccess file generated by Wordpress is the following:

# 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

有什么想法?

我试图改变固定链接结构为以下内容:

I tried to change permalink structure to the following:

/index.php/%postname%/

和它快乐地工作。现在然而,问题是,这并不奇怪,在链接的格式如下:

and it happily worked. However, the problem is now, not surprisingly, the links are in the following form:

www.mysite.com/index.php/my-page.com

我的问题是如何从我的链接删除的index.php 。当我从固定链接结构删除它(即 /%postname%/ ),我的链接不再起作用。

My question is how can I remove index.php from my links. When I remove it from the permalink structure (i.e., /%postname%/), my links no longer work.

PS:不要使用博客条目我用我的网站只有网页。如果需要我的网站是:mll.sehir.edu.tr

PS: Instead of using blog entries I use only pages in my site. If it is necessary my site is: mll.sehir.edu.tr.

推荐答案

听起来像是你的服务器上的符号链接有问题。尝试在你的.htaccess,并请其作出更改后变为644:

Sounds like a problem with symlinks on your server. Try this in your .htaccess and also please change it to 644 after making the change:

Options +FollowSymlinks
RewriteEngine on

# 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