P
P
podust2014-09-12 15:46:10
Apache HTTP Server
podust, 2014-09-12 15:46:10

How to properly issue a Redirect 301?

Comrades, thank you all. It wasn't about the bobbin. My rules turned out to work fine, and I didn't know it because of the chain of damn caching proxies through which my browsers accessed the Web (Shame on me!).

I apologize in advance for the stupid newbie question, but I have been looking for an answer for half an hour and have not been able to find it yet.
The task is to set up a redirect of pages with URLs of the form:
http://temp.site.ru/folder/*
To:
http://new.site.ru/*
I do this:
redirect 301 /folder http://new.site.ru
And this:
redirect 301 /folder/ http://new.site.ru/
And this:
redirectMatch 301 ^/folder/(.*)$ http://new.site.ru/$1

The redirect works, but it does not redirect as we would like, leaving /folder/ in the new URL, that is, the new address in the browser line becomes this:
http://new.site.ru/folder/*
And this is required:
http://new.site.ru/*
Please help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan, 2014-09-12
@podust

redirectMatch 301 ^/folder/(.*)$ http://new.site.ru/

and so?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question