O
O
oleg2016-04-26 12:49:05
htaccess
oleg, 2016-04-26 12:49:05

Why doesn't GET work in RewriteRule?

Good afternoon! Looking at similar questions, I understand that get via mod_rewrite should be passed in a wrong way.
But still, forgive the newbie ... How to make this work?
RewriteRule ^house$ /s[category]=6
just to make get become /house/
Found that it must be at the end of [QSA] - but it didn't help =(
Thanks.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2016-04-26
@shambler81

Get is not part of url

# 301 --- http://www.test.com/faq.html?faq=13&layout=bob => http://www.test2.com/faqs.html?test=1
RewriteCond %{HTTP_HOST} ^www\.test\.com$
RewriteCond %{QUERY_STRING} (^|&)faq=13($|&)
RewriteCond %{QUERY_STRING} (^|&)layout=bob($|&)
RewriteRule ^faq\.html$ http://www.test2.com/faqs.html\?test=1 [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question