Again new old problems, also with Joomla

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
M*I*B
-


Joined: 05 Dec 2019
Posts: 33
Location: Germany

PostPosted: Wed Sep 15, 2021 7:23 am    Post subject: Again new old problems, also with Joomla Reply with quote

Hello dear people,

I had this topic here a long time ago, but unfortunately it was not really resolved.
I want a 301 if ...
* NOT mail.mydomain.de
- OR
* IS any other.mydomain.de

The fact that it does not redirect at "mail.mydomain.de" seems to work (HOST not equal to "mail"). But what is missing here is "is equal", so that I could write "HOST is equal to www". That would actually be the end of the matter. But that's simply missing.

* Question: How can I redirect a request from "www.mydomain.de" to "mydomain.de" by other means?


Another topic in this context:
I'm currently trying to get the latest Joomla version up and running, including rewriting the URLs to readable URLs. In addition, Joomla provides an htaccess in which everything is regulated. But Abyss simply ignores them ...

* So the question about this is how you can make this thing work?
_________________
DLzG
Micha
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1176

PostPosted: Wed Sep 15, 2021 10:36 am    Post subject: Re: Again new old problems, also with Joomla Reply with quote

M*I*B,

The human way of explaining things can sometimes make it difficult to translate it to the machine context:

Do you confirm that you want to do a 301 redirect if
HTTP_HOST not equal to mail.example.com
AND
HTTP_HOST matches with *.example.com
?

Regarding Joomla and their htaccess file:
htaccess files are only for Apache. So you have to convert their URL rewriting rules or ask us for help (just send us the file and we'll convert it for you.)

Conversion rules are outlined in https://aprelium.com/abyssws/articles/urlrewriting-modrewrite-conversion.html but most of the time htaccess files are overengineed and we could simplify them to a single URL rewriting rule or two.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
M*I*B
-


Joined: 05 Dec 2019
Posts: 33
Location: Germany

PostPosted: Wed Sep 15, 2021 1:21 pm    Post subject: Reply with quote

hmmm... like that... With other words:

I have 4 domains. Let's call them D0 (master) to D3.
I have a webmailer which can be called up under mail.Dx. This is the only subdomain that is allowed.
The call of any domain with the WWW or something else than mail in front of it should redirect to D0 (301 permanent), as well as the call of D1-D3 without anything in front of it.

So...

http (s)://D0/* is the Master destination
http (s)://mail.Dx -> https://mail.D0
http (s)://[NOT mail].Dx/* -> https://D0/*

In the meantime I have done the following, which seems to work at first:

Rule 1:
^/(.*)$
HTTPS Is not equal to ON
HOST Is not equal to mail

Apply to subrequest
Perform external
Redirect to https://D0/$1
Append Query
Escape Redirection
301

Rule 2:
^/(.*)$
HTTP Header: HOST Does not match with ^D0(.*)

Apply to subrequest
Perform external
Redirect to https://D0/$1
Append Query
Escape Redirection
301
_________________
DLzG
Micha
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1176

PostPosted: Thu Sep 16, 2021 9:42 pm    Post subject: Reply with quote

M*I*B wrote:
hmmm... like that... With other words:

I have 4 domains. Let's call them D0 (master) to D3.
I have a webmailer which can be called up under mail.Dx. This is the only subdomain that is allowed.
The call of any domain with the WWW or something else than mail in front of it should redirect to D0 (301 permanent), as well as the call of D1-D3 without anything in front of it.

So...

http (s)://D0/* is the Master destination
http (s)://mail.Dx -> https://mail.D0
http (s)://[NOT mail].Dx/* -> https://D0/*


The requirements seem to change from day to day. :) Are you sure this is the final version?

How many hosts do you have? How are these domain names associated with the hosts (D0, mail.Dx, *.Dx)?

This will help us give you a way to write these rules without loops or ambiguities.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
M*I*B
-


Joined: 05 Dec 2019
Posts: 33
Location: Germany

PostPosted: Thu Sep 16, 2021 9:52 pm    Post subject: Reply with quote

... nope, it's ever the same domains ;o) Trust me ...
I just have write it down in different ways due I think that we most not talking about the same ...

D0 = Masterdomain
D1 = Slave 1
D2 = Slave 2
D3 = Slave 3
Dx = Any of them above (x = 0 or 1 or 2 or 3)
_________________
DLzG
Micha
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1176

PostPosted: Fri Sep 17, 2021 7:23 pm    Post subject: Reply with quote

M*I*B wrote:
... nope, it's ever the same domains ;o) Trust me ...
I just have write it down in different ways due I think that we most not talking about the same ...

D0 = Masterdomain
D1 = Slave 1
D2 = Slave 2
D3 = Slave 3
Dx = Any of them above (x = 0 or 1 or 2 or 3)


We understood all about the domain names. But our question was about the hosts. How many hosts do you have? (H1, H2....)

Which domains are associated with which hosts? (for example H1 -> D0, H2->D1,D2 ...)

We need the mapping with hosts and domain names to know what to configure and how rules should be after resolving domain names.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
M*I*B
-


Joined: 05 Dec 2019
Posts: 33
Location: Germany

PostPosted: Fri Sep 17, 2021 8:53 pm    Post subject: Reply with quote

ahhh ok ... Now I get it ...

Just 1 Host where all the Domains are in ...
_________________
DLzG
Micha
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1176

PostPosted: Mon Sep 20, 2021 8:57 pm    Post subject: Reply with quote

M*I*B wrote:
ahhh ok ... Now I get it ...

Just 1 Host where all the Domains are in ...


So we'll assume you have a first host associated with host names D0, D1, D2, D3, *.Dx. This host should have the following URL rewriting rules:

Code:
Rule 1:
^/(.*)$
HTTPS Is not equal to ON
HOST does not match with mail\.(.*)|D0

Apply to subrequest
Perform external
Redirect to https://D0/$1
Append Query
Escape Redirection
301


The second host will be only associated with host name mail.D0.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
M*I*B
-


Joined: 05 Dec 2019
Posts: 33
Location: Germany

PostPosted: Mon Oct 11, 2021 8:54 am    Post subject: Reply with quote

... sorry for late reply; was sick a while ...

Ok. that doesn't work.

www.D0.de dont will be rewritten to D0.de, also www.Dx.eu stay at it, also mail.D0.eu stay at eu and will not be rewritten to de.

This rule simply does ... nothing.

I think it won't work, especially not with regard to the second part "Joomla" ...
_________________
DLzG
Micha
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1176

PostPosted: Wed Oct 13, 2021 7:33 pm    Post subject: Reply with quote

M*I*B wrote:
... sorry for late reply; was sick a while ...

Ok. that doesn't work.

www.D0.de dont will be rewritten to D0.de, also www.Dx.eu stay at it, also mail.D0.eu stay at eu and will not be rewritten to de.

This rule simply does ... nothing.

I think it won't work, especially not with regard to the second part "Joomla" ...


Could you please send by email to our technical support your abyss.conf file for review?
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
M*I*B
-


Joined: 05 Dec 2019
Posts: 33
Location: Germany

PostPosted: Thu Oct 14, 2021 7:43 am    Post subject: Reply with quote

... no longer necessary: I'm back to Apache on this server
_________________
DLzG
Micha
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1176

PostPosted: Tue Nov 02, 2021 9:37 pm    Post subject: Reply with quote

M*I*B wrote:
... no longer necessary: I'm back to Apache on this server


Apache doesn't have AI to auto-write URL rewriting rules. :) So how have you solved the issue with it? What made Apache so superior in that use case?

Can you show us the redirection rules in your .htaccess?
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
M*I*B
-


Joined: 05 Dec 2019
Posts: 33
Location: Germany

PostPosted: Wed Nov 03, 2021 7:51 am    Post subject: Reply with quote

... Unfortunately you did not understand it, but I will explain it again:
Joomla and other systems almost always have their own htaccess file. Abyss cannot read this htaccess. So there is a need to translate this htaccess into the Abyss format.
That's why I asked for help here. And that wasn't the first time I've asked for help with things like this, which was mostly unsuccessful.
With Apache I didn't need to ask anyone for help, since Apache can natively read and implement the htaccess from e.g. Joomla. In addition, there are so many pages on the topic of Apache, htaccess and mod_rewrite that I can usually help myself there.

Finally, I would like to say the following:
At the time I bought Abyss because I was tired of having to manually renew the certificates because there was nothing useful for Apache under Windows. In the meantime, that has changed.
I also found that Abyss causes problems with many other things, such as when you just want to run a simple update under WoltLab. There is also a thread from me here that ultimately had no solution to the result.

Nothing against Abyss. For some users this is certainly quite sufficient. In the meantime, however, I was able to determine that Abyss caused me significantly more problems than Apache, which also were and are not solvable.

Conclusion for me:
I will probably continue to use Abyss for some small applications on my test server. For my live systems, however, Apache is and remains the first and only choice.
_________________
DLzG
Micha
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1176

PostPosted: Wed Nov 03, 2021 10:17 pm    Post subject: Reply with quote

M*I*B,

Most mod_rewrite directives in Joomla and similar scripts boil down to the same set of URL rewriting rules. There is no magic there.

What you were asking about above had nothing to do with Joomla or its URL rewriting rules.

You were asking for a complex scheme of redirecting a set of domain names to another one based on complex rules that you were changing on each clarification request from us: Joomla doesn't deal with things such as:

Code:
http (s)://D0/* is the Master destination
http (s)://mail.Dx -> https://mail.D0
http (s)://[NOT mail].Dx/* -> https://D0/*


Anyway, we hope your switch made things easier on your side. We are also sure you'll come back to Abyss after a while :)
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
M*I*B
-


Joined: 05 Dec 2019
Posts: 33
Location: Germany

PostPosted: Thu Nov 04, 2021 7:52 am    Post subject: Reply with quote

You are right. This last things are not Joomla but there is a thread about that.
And also this thing here is easy to handle by Apache without rewrite just by placing a Redirect 301 directive to every vHost you like to redirect...

Sample:
Code:
<VirtualHost *:80>
   ...
   ServerName master.de
   ...
</VirtualHost>
<VirtualHost *:80>
   ...
   ServerAlias slave1.eu
   ServerAlias slave2.de
   ServerAlias slave3.eu
   ServerAlias www.master.de
   ServerAlias www.slave1.eu
   ServerAlias www.slave2.de
   ServerAlias www.slave3.eu
   ...
   Redirect 301 / http://master.de
</VirtualHost>

That's it. Webmail, other special subs and SSL (just place the Master in the AliasVH and Redirect to httpsVH declared in the 1st VH) follow the same schema you can handle without the need of rewrite-rules
_________________
DLzG
Micha
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1176

PostPosted: Mon Nov 08, 2021 10:15 pm    Post subject: Reply with quote

M*I*B wrote:

That's it. Webmail, other special subs and SSL (just place the Master in the AliasVH and Redirect to httpsVH declared in the 1st VH) follow the same schema you can handle without the need of rewrite-rules


And you could achieve the same thing with Abyss Web Server by creating a first host master.de and a second host which has all these names then add a single rewriting rule as follows:

Code:
Rule 1:
^/(.*)$

Apply to subrequest
Perform external
Redirect to http://master.de/$1
Append Query
Escape Redirection
301


But keep in mind that you Apache except does not handle HTTPS and some use cases you raised. So it's not equivalent to the original quiz.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group