N
N
nester_prod2015-03-16 16:31:39
PHP
nester_prod, 2015-03-16 16:31:39

Htaccess redirect passing all GET parameters?

there is an index.php page
there are links like domain.ru/word/number
how to make a redirect to the page domain.ru/index.php?type=word&offset=number ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
FanatPHP, 2015-03-16
@FanatPHP

What for?

V
Vitaly Ozersky, 2015-03-16
@Ozerich

RedirectMatch Permanent ^/(\w+?)/(\d+?)/*$ http://domain.ru/index.php?type=$1&offset=$2

S
ShamblerR, 2015-03-17
@ShamblerR

Without saving geta

RewriteEngine on
RewriteCond %{QUERY_STRING} ^uid.*?ru$ [NC]
RewriteRule ^icq\/validate\.html$ /index.php?

With the preservation of the geta
# Rewrite --- text/faq.html?faq=20 => helpdesk/kb.php
RewriteCond %{QUERY_STRING} (^|&)faq=20($|&)
RewriteRule ^text/faq\.html$ /helpdesk/kb.php?&%{QUERY_STRING}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question