字preSS如何删除?从URL使用的htaccess的 [英] wordpress how to remove ? from the url using htaccess

查看:202
本文介绍了字preSS如何删除?从URL使用的htaccess的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网址 http://www.domain.com/wp/application/?产品名称

我想将其更改为 http://www.domain.com/wp/application/产品名称。 如果我有这样的待遇再找不到页面错误显示。 我没有使用的产品名称在我的应用程序页面,  我想只是显示在URL的搜索引擎优化产品的名称。 和页面应该显示的应用程序页面的内容。

WP是我的根文件夹和应用是我的页

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

如何删除?使用该URL Htacccess(字preSS)

我用下面的htaccess code。但它不工作的我的病情。否则所有页面都运作良好。

 < IfModule mod_rewrite.c>
RewriteEngine叙述上
的RewriteBase / WP /
重写规则^指数\ .PHP $  -  [L]
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则。 /wp/index.php [L]
< / IfModule>
 

解决方案

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

设置>永久链接>勾选文章名称,即/%postname%/

如果你的的htaccess 文件不可写,去你的Word preSS安装的根目录,并添加它告诉你添加(下面的):

 < IfModule mod_rewrite.c>
RewriteEngine叙述上
的RewriteBase /
重写规则^指数\ .PHP $  -  [L]
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则。的index.php [L]
< / IfModule>
 

i having a URL http://www.domain.com/wp/application/?productname

I want to change it to 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. and page should be display the content of application page .

wp is my root folder and application is my page

Please Tell me Any solution htaccess or any plugin

How to remove ? from the URL using Htacccess(Wordpress)

I use following htaccess code. 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', i.e. /%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):

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

这篇关于字preSS如何删除?从URL使用的htaccess的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆