Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How would I rewrite the following using mod_rewrite with wildcards: Wildcard Word Here)

to: Wildcard Word Here)
share|improve this question

Tested and got this to work.

RewriteEngine On
RewriteCond %{QUERY_STRING} ^wordInput=(.*)$
RewriteRule ^/glossary/WordFind\.php.*$ /index.php?option=com_glossary&Itemid=326&view=word&word=%1 [R]
share|improve this answer
My original RewriteCond was against the URI instead of the Query String. I tested this out and it seems to work. – Sean C. Mar 28 '11 at 19:37
I got this to kind of work: – Joshua Riddle Mar 28 '11 at 22:20
i eventualy got this to kind of work RewriteCond %{QUERY_STRING} ^wordInput=(.*) RewriteRule ^glossary/wordfind\.php index.php?option=com_glossary&Itemid=326&view=word&word=%1 However the url it produces stil contains the wordfind.php. keep in mind the fact that all urls are rewritten to lowercase. Thanks for the help so far. @Sean, youve got me closer to the solution. – Joshua Riddle Mar 28 '11 at 22:22
isnt there a special character for removing the original query string? – Joshua Riddle Mar 28 '11 at 22:23
I think you need the / in front of index.php to specify the proper URL. index.php is on the root, is it not? RewriteRule ^glossary/wordfind\.php /index.php?option=com_glossary&Itemid=326&view=word&word=%1 – Sean C. Mar 28 '11 at 23:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.