W
W
WebEditor2013-12-07 08:08:11
Apache HTTP Server
WebEditor, 2013-12-07 08:08:11

How to create Rewirite correctly?

Good day.
Tell me how to create Rewrite correctly so that it works

ссылка                                                    указатель

site.ru/test/1231/rule/kak-bi/            =>              site.ru/index.php?test=1231&rule=kak-bi
site.ru/Error/404/stranica-ne-naidena     =>              site.ru/index.php?Error=404&text=stranica-ne-naidena

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WebEditor, 2013-12-07
@WebEditor

Sorry, I was stupid awake))

RewriteEngine On
RewriteRule ^test/([^/]*)/rule/([^/]*)$    /index.php?test=$1&rule=$2 [L]
RewriteRule ^Error/([^/]*)/([^/]*)$       /index.php?Error=$1&text=$2 [L]

PS: correct me if I'm wrong)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question