• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Suspect Redirect

Wikibear

Regular Pleskian
I have a redirect with my host from domain.com to anotherdomain.com via created host with 301. Why is that able to get a site from anotherdomain.com/folder/news via domain.com/folder/news?

I think if i set 301 then all request for domain.com will be redirected to anotherdomain.com. My apache server respond on domain.com with links. That looks like an issue for me.
 
When a redirect directive ends with a slash, the redirect is not pointing to the home page of the destination, but is replacing everything before the slash with the domain of the destination. For that reason domain.com/my/test/file redirects to anotherdomain.com/my/test/file and not anotherdomain.com/. This behavior is by design. A redirect destination must not end with a slash to disable this domain replacement.
 
Then i must create a fully host and redirect to the real page? Or is there a better way without creating a fully new host.
 
I see. What you are criticizing is that Plesk always add a trailing slash to the redirect target, which does not enable you to redirect all traffic to the homepage of the target, regardless of the subdirectories a URL can contain.

In that case I suggest to configure the domain as "web space" instead of "forwarding". In the web space create a text file named ".haccess" as the only file in the document root directory. Enter this line into it:
Code:
Redirect 301 / http://anotherdomain.com
 
Back
Top