简体   繁体   English

WordPress如何删除? 从网址使用htaccess

[英]wordpress how to remove ? from the url using htaccess

i having a URL http://www.domain.com/wp/application/?productname 我有一个URL http://www.domain.com/wp/application/?productname

I want to change it to http://www.domain.com/wp/application/productname . 我想将其更改为http://www.domain.com/wp/application/productname if i have treated like this then page not found error is display. 如果我已经这样处理,则显示页面未找到错误。 i don't have use of product name in my application page , i want to just show the name of product in URL for SEO. 我没有在应用程序页面中使用产品名称,我只想在SEO的URL中显示产品名称。 and page should be display the content of application page . 页面应显示申请页面的内容。

wp is my root folder and application is my page wp是我的根文件夹,应用程序是我的页面

Please Tell me Any solution htaccess or any plugin 请告诉我任何解决方案htaccess或任何插件

How to remove ? 如何删除? from the URL using Htacccess(Wordpress) 使用Htacccess(Wordpress)从URL中获取

I use following htaccess code. 我使用以下htaccess代码。 But it is not working for my condition .otherwise all pages are working well 但是它不适用于我的情况。否则所有页面都工作正常

<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>

You need to set your Permalinks structure. 您需要设置您的永久链接结构。

Go to Settings > Permalinks > Check the box 'Post Name', ie /%postname%/ 转到Settings > Permalinks > Check the box 'Post Name', ie /%postname%/ 在此处输入图片说明

If your . 如果你的 。 htaccess file is not writeable, go to the root of your WordPress installation and add what it tells you to add (The below): 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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM