Member Avatar for bthaxor

hey all,

could someone please help me with my htaccess file... i am currently running a wordpress blog, and a url for a search (here the term 'SEARCHTERM' is searched) is like this:

http://www.bthaxor.com/?s=SEARCHTERM&search=Search

i would like to use mod_rewrite to convert such a url to this (exactly like this):

http://www.bthaxor.com/search/SEARCHTERM/

which rewrite rule can i use for this? so far in my htaccess file i have the following:

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

SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

Options -Indexes

thanks for your help.

Try this:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^search/(.*)$ index.php?s=$1&search=Search

I haven't tested the above code but should rewrite the url to www.whatever.com/search/SEARCHTERM

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.