Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domainimport does not use Default Redirect Code #546

Closed
Af0x opened this issue Apr 19, 2018 · 8 comments
Closed

Domainimport does not use Default Redirect Code #546

Af0x opened this issue Apr 19, 2018 · 8 comments

Comments

@Af0x
Copy link

Af0x commented Apr 19, 2018

Hello,
if you import Domains via csv and enter an URL as Docroot it does not use the Redirect Code set under the webserver-settings. It always uses 301.
Regards,
Af0x

@d00p
Copy link
Member

d00p commented Apr 19, 2018

It's not the import but the cronjob ;) This should also be the case when you add the domain as admin. Could you try again with the attached patch?

fix-default-domain-redirectcode.diff.txt

@Af0x
Copy link
Author

Af0x commented Apr 19, 2018

I already changed all Codes manually :/

@Af0x
Copy link
Author

Af0x commented Apr 24, 2018

I try to change your diff manually and need to know what things like this mean:

@@ -964,7 +964,7 @@ class apache extends HttpConfigBase

@Af0x Af0x closed this as completed Apr 24, 2018
@Af0x Af0x reopened this Apr 24, 2018
@d00p
Copy link
Member

d00p commented Apr 24, 2018

It's a patch file....https://git-scm.com/docs/git-apply

@Af0x
Copy link
Author

Af0x commented Apr 24, 2018

now I was able to run the job but it failed with Error:

Syntax error on line 14 of /etc/
apache2/sites-enabled/35_froxlor_normal_vhost_domain.tld.conf
RewriteRule: bad flag delimiters

Line 14 says something like this:

RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [R=307 ();L,NE]

I set 307 as default.

@Af0x
Copy link
Author

Af0x commented Apr 24, 2018

I also want to suggest: maybe it makes sense to set a separate RedirectCode for http to https?
Because in my opinion 301 would be fine in this case but not always for other cases like Redirecting to an other domain temporarily.

@d00p
Copy link
Member

d00p commented Apr 24, 2018

Ah, damn function adds the code-description too, try this:
https://gist.github.com/d00p/2b5bb1cfafd3b1e8b6ad4b7d6c95d9d0

@Af0x
Copy link
Author

Af0x commented Apr 24, 2018

now it works from my perspective, thank you :)

@d00p d00p closed this as completed in b3d018c Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants