P中$ PSS字$永久链接 - 网页未找到 [英] Permalinks in Wordpress - Page not found
问题描述
我一直在寻找小时,但没有发现任何东西,这似乎是能够解决这个问题。
I've been searching for hours but haven't found anything that seems to be able to solves this issue.
下面的情况:
我正在做基于二十十一主题可湿性粉剂主题。一切正常,直到我决定改变URL来固定链接。所显示的唯一网页是我前面定义静态页面。
I'm making a wp theme based on the "Twenty Eleven" theme. Everything went fine til I decided to change the urls to permalinks. The only page being displayed is the static page that I have defined earlier.
我已经设置了htacces文件。事实上,WP自动做到了。一切正常,如果我切换回默认设置,但是,对于搜索引擎优化,我宁愿使用固定链接选项。
I have set up the htacces file. In fact, WP did it automatically. Everything works if I switch back to the default setting, but, for SEO, I would rather use the permalinks option.
下面是我的htaccess的文件(这是我的WP安装文件夹):
Here is my htaccess file (it is on my WP installation folder):
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mysite/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /mysite/index.php [L]
</IfModule>
# END WordPress
我已经看到了这个帖子字preSS的.htaccess与固定链接但什么也没有能帮助我。任何帮助将是非常好的。
I have seen this post wordpress .htaccess with permalinks but nothing there could help me. Any help would be very nice.
更新:事情我已经尝试:
- 删除页面并重新创建。
- 进入永久字段wp_options(DB),并将其值设置为空白,并重新设置在管理的永久链接选项。
- I'm运行它在Windows 7上通过的Apache2安装Zend服务器中。
- 我认为这是关系到我的本地环境问题,所以我把网站在线。没有运气可言。我假设这个词preSS不容更改的永久链接到一个更友好的URL类型,当你设置一个静态的头版。真是丢脸。
推荐答案
对于那些使用Apache。您需要将
For those using apache. You will need to
- 确保你的.htaccess在您托管站点的根路径。例如在/ var / WWW
- 更新/ etc / apache2的/站点可用/默认
在
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
到
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
希望这可以帮助别人
Hope this helps someone
这篇关于P中$ PSS字$永久链接 - 网页未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!