landsman landsman - 4 months ago 63
PHP Question

htaccess mod_rewrite rule for one parameter [solved]

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.