wordpress如何删除?来自网址使用htaccess

时间:2012-10-04 05:54:15

标签: wordpress .htaccess plugins url-rewriting query-string

我有一个网址http://www.domain.com/wp/application/?productname

我想将其更改为http://www.domain.com/wp/application/productname。 如果我这样对待,则显示页面未找到错误。 我在申请页面中没有使用产品名称,  我想在SEO的URL中显示产品的名称。 和页面应显示应用程序页面的内容。

wp是我的根文件夹,应用程序是我的页面

请告诉我任何解决方案htaccess或任何插件

如何删除?来自使用Htacccess(Wordpress)的URL

我使用以下htaccess代码。但它不符合我的条件。所以所有页面都运行良好

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

1 个答案:

答案 0 :(得分:1)

您需要设置永久链接结构。

转到Settings > Permalinks > Check the box 'Post Name', i.e. /%postname%/ enter image description here

如果。htaccess文件不可写,请转到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>