landsman landsman - 1 month ago 5
Apache Configuration Question

htaccess mod_rewrite rule for one parameter

how can I write something like this:

RewriteCond %{QUERY_STRING} s=(\w+)
RewriteRule ^ wordpress/?s=%1 [L]

I need do rewrite rule from to

Folder with wordpress is by symlink but It is not interesting.

Rule what I was send works but makes error 500 on other URLs like


Btw: I must send this "body" twice for successful validation. Wtf @stackoverflow? And why are you cut greeting?


You just need this single rule:

RewriteEngine On

RewriteRule ^/?$ wordpress/ [L]

Original query string is automatically copied over.