English 中文(简体)
措辞 Press search result URL using .htaccess file
原标题:Modify WordPress search result URL using .htaccess file
  • 时间:2011-11-23 09:43:56
  •  标签:
  • wordpress

目前,Im正在试验使用经修改的搜索器的语音压力网站。 网址显示动态网页。

进入搜查期时,会产生与下列情况相似的URL:

example.com/?s=search+term

在我的存取档案中添加一条规则,将URL的结果改变为更友好的东西,而不影响搜查。 网址的功能? 例如:

例如:com/search-term

或者,甚至更好:

例如:com/BLOG NOE/search-term.html

最佳回答

我认为,如果没有.html或任何其他骗局,你就能够做到这一点,因为拖欠的劳动合同使用干净的劳役员额,因此你可以放弃这种功能,但你可以这样做:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog_name/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ([^/]+).html$ ./?s=$1 [L]
</IfModule>
问题回答

I use pages (ie. not posts) that are setup as children of a parent page. In my menu bar navigation they appear as

/services/page1.html
/services/page2.html
/services/page3.html





相关问题
Wrap stray text in <p> tags

Wordpress issue.. how do I wrap stray text in P tags? Example: Before- <div class = "content"> <img src = "hello.jpg"/> <h1>Introduction</h1> Hello! this is ...

Using jQuery Plugins with Wordpress

Having a bit of trouble using jQuery plugins (Superfish, jQuery UI, etc) using Wordpress. Everything works fine in my plain non-Wordpress site, but Wordpress seems to conflict with JQuery. There must ...

WordPress Data Storage Efficiency

I ve been asked to review a WordPress plugin of sorts and try to find ways of making it faster. The premise of this plugin is basically to store a bunch of users and shifts and appointments and ...

Why can t I properly style a blockquote in Wordpress?

On the design I just created for my website, I have a blockquote styled with two quote images using the span technique in css: blockquote { background-image: url(images/openquote.jpg); background-...

How does the WordPress <!--nextpage--> tag actually work?

What happens? I m guessing that somehow the post or page is parsed before displaying, and then just split into two methods? I can t seem to find any documentation on how the underlying <?php ...

Wordpress Plug-ins: How-to add custom URL Handles

I m trying to write a Wordpress Plug-in but can t seem to figure out how you would modify how a URL gets handled, so for example: any requests made for: <url>/?myplugin=<pageID> will ...

热门标签