R
R
rammsteinik2016-04-13 16:10:39
htaccess
rammsteinik, 2016-04-13 16:10:39

Can you help me fix .htaccess quickly?

There is .htaccess for dynamic subdomains, you also need to pass get data.
File:

RewriteCond %{HTTP_HOST} !^www\.test\.ru$
RewriteCond %{HTTP_HOST} ^(.*)\.test\.ru$
RewriteRule ^(.*)$ http://test.ru/users.php?user=%1 [L,P]

It's just displaying the content http://test.ru/users.php?user=loginat the actual address http://login.test.ru. How to allow GET type parameters to be passed http://login.test.ru/?page=2to http://test.ru/users.php?user=login&page=2
Try so it doesn't work
RewriteCond %{HTTP_HOST} !^www\.test\.ru$
RewriteCond %{HTTP_HOST} ^(.*)\.test\.ru$
RewriteCond %{REQUEST_URI} ^/?page=(.*)
RewriteRule ^(.*)$ http://test.ru/users.php?user=%1&page=$1 [L,P]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2016-04-13
@rammsteinik

If you just need to transfer the url with the get to a regular page.

RewriteCond %{QUERY_STRING} ^id=229
RewriteRule ^test\.html$ /supermodel/? [R=301,L]

if you need to go to a page with saving all getas
Rewrite --- www.test.com/test.html => www.test.com/spiders.html
RewriteRule ^test\.html$ /spiders.html?&%{QUERY_STRING}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question