The Apache Haus Forum

Please login or register.

Login with username, password and session length
Advanced search  


Welcome to Apache Haus Distribution Forum

Pages: [1]   Go Down

Author Topic: Permanent redirect to URL of new website (if user hits the URL of inactive site)  (Read 621 times)


  • Newbie
  • *
  • Offline Offline
  • Posts: 1

ADMIN EDIT: This thread seems to be stuck in moderation hell and I have no idea how to get it Approved since I follow the docs but still it does nothing.

The old website is shut down and inactive (and Apache is also shut down for the old website). If a user attempts to try the URL of the old website, the user duly gets the message as website not found - and this is indeed the expected behavior.

What I wish to have is:
Any user attempting to go to the old website (or any sub-page of the old website) will now be redirected to the new website (only the new website is active, the old website is shut down). And any change in the Apache needs to be made in the Apache of the new website only.

Redirecting any page of the old website to the mapping page in the new website will be ideal, as:
hxxps:// to hxxps://

If not, redirecting the context root of to will be acceptable.
Redirecting hxxps:// to hxxps:// will also be acceptable.

I am using Apache 2.4.47 Win64 from Xampp. Please suggest what changes need to be made in the Apache of the new website:
1) Which file in Apache to edit
2) And what to add/include in that file to accomplish the following.


A website e.g. hxxps:// does NOT exist anymore (shut down/inactive).
Any user who wants to go to website hxxps:// (because the old website might be bookmarked) will now be redirected to a new (and active) website, which is hxxps://

If a user has bookmarked the old website, or any sub-pages in the old website (e.g. bookmarked hxxps:// will be just re-directed to the main entry page of hxxps:// (or to hxxps://

The old website was cloned to a new domain (all the content and sub-URLs are the same). And after cloning, the old website was shut down and the new website was made active. However, the prior users have a bookmark of the old website and I would like them to get redirected to the new website, whenever they hit the URL of the old website. It is not possible to notify the users as the list of the users is not known. Redirect (permanent) will work the best.

« Last Edit: August 13, 2021, 10:24:51 AM by mario »


  • Administrator
  • Member Elite
  • *****
  • Offline Offline
  • Posts: 886

Need more info.

1. Is the old domain name still registered to you?
2. Do you still have valid certficates fo
3. Is the old domain pointing to the same IP as the new?
4. What have you changed to conf/httpd, conf/extra/httpd-ssl & conf/extra/httpd-vhosts .conf files.

I understand the problem but not knowing how you configured apache it is hard to tell you what you need to do.

Also consider this, a Redirect permanent doesn't change peoples bookmarks, only they can do that. I think instead I would have them land on a special page that specifically tells them your site has moved with a link to the new URL and ask them to update their bookmark for it. Like used to be done in the old days. It gives them a heads up. See once the old domain is no longer available they are going nowhere. Now this doesn't mean you have to bring the old server online. Hence question 3.


  • Administrator
  • Member Elite
  • *****
  • Offline Offline
  • Posts: 620

AdminNote: I Fixed the stuck in moderation issue on the DB level.
Pages: [1]   Go Up

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13