【问题标题】:wordpress how to remove ? from the url using htaccesswordpress如何删除?从使用 htaccess 的 url
【发布时间】:2012-09-25 02:58:05
【问题描述】:

我有一个 URL 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>

【问题讨论】:

  • 不确定您的问题是什么,您说您使用的是以下代码,但我在您的问题中看不到任何内容。
  • 可能是Apache2 URL重写没有开启。

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


【解决方案1】:

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

转到Settings &gt; Permalinks &gt; Check the box 'Post Name', i.e. /%postname%/

如果您的 .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>

【讨论】:

  • 你设置了永久链接结构了吗?
猜你喜欢
  • 1970-01-01
  • 2014-04-13
  • 1970-01-01
  • 1970-01-01
  • 2014-10-08
  • 1970-01-01
  • 2011-05-15
  • 1970-01-01
  • 2012-01-04
相关资源
最近更新 更多