redirecting a search query

New to mod_rewrite? This is a good place to start.

redirecting a search query

Postby fris » Wed Sep 02, 2009 7:51 pm

im trying to make wordpress allow

domain.com/search/search-term.html

RewriteRule ^search/(.+)?$ /index.php?s=$1 [QSA,L]

this allows /search/search+term

how would it be changed to allow search-term.html
fris
 
Posts: 52
Joined: Thu Feb 23, 2006 12:05 pm

Postby richardk » Thu Sep 03, 2009 5:23 pm

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^search/(.+)\.html$ /index.php?s=$1 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 21 guests

cron