Skip to Content.
Sympa Menu

lyceum-users - Re: [Lyceum-users] .htaccess and redirects

lyceum-users AT lists.ibiblio.org

Subject: Lyceum-users mailing list

List archive

Chronological Thread  
  • From: John Neil <John.Neil AT uts.edu.au>
  • To: 'DaveG' <lyceum AT solidgone.com>
  • Cc: lyceum-users AT lists.ibiblio.org
  • Subject: Re: [Lyceum-users] .htaccess and redirects
  • Date: Tue, 05 Sep 2006 11:57:11 +1000

Dave, thanks again for you time and patience in replying:


>From your description it sounds like you want to take the approach that
>all Drupal urls will be www.mydomain.com or mydomain.com, and all Lyceum
>URLs will be myuser.mydomain.com. That is, Lyceum is anything other than
>www., and Drupal is always www. or simply no www.

Essentially yes: the site in question is a static site (drupal root
www.mydomain.com and http:www.mydomain.com). Certain users are given a blog
for training purposes but it is important that each user has a url presence
eg myuser.mydomain.com.

>The problem with this is going to be the root of Lyceum would also be
>mydomain.com (ie, no www.), so now we'd have to handle each case, or each
>page that Lyceum uses with no subdomain prefix.

I'll take your word for this although I'm not sure what it means: does there
need to be a lyceum root (is that portal.php) or is the admin for each
individual blog?

>There are a number of approaches you could take, but the easiest (given
>that you already have a Drupal based site) is to make all lyceum urls be
>like myuser.mydomain.com/lyceum/... We'll then assume any url without
>the /lyceum/ part is Drupal.

This was approach was how I originally conceived it happening. My
requirement is that users can have a clean and identifiable url as in
myuser.mydomain.com without having to complicate the visual presence with a
subdirectory. Given that I would not be keen on replacing the static
(Drupal) site does all the above indicate that I may have to compromise and
have a myuser.mysite.com/lyceum url as standard for individual blogs?

> Thanks for your help to this point Dave, I am happy to make some financial
> contribution to you for any further assistance as I think you have gone
> above

>This is not necessary. I'm helping because I want to not for financial
>gain. I would suggest donating to the Lyceum project, but I don't think
>they accept donations.

John replied to this later on the list and I will take the opportunity to
donate to the lyceum project. Thanks again though Dave for the sterling work
in helping out.

Kind Regards


-----Original Message-----
From: lyceum-users-bounces AT lists.ibiblio.org
[mailto:lyceum-users-bounces AT lists.ibiblio.org] On Behalf Of DaveG
Sent: Friday, 1 September 2006 9:32 PM
To: John Neil
Cc: lyceum-users AT lists.ibiblio.org
Subject: Re: [Lyceum-users] .htaccess and redirects

We still have two issues here. You have problems with .htaccess, but you
also have questions to answer about *how* we can tell the difference
between Drupal and Lyceum in the URL. I'd suggest that's the question to
answer before fixing the .htaccess. The rewrites (ie, .htaccess) work by
taking a clean URL and converting it into the physical server path for
the file/request. So we need to work out what the clean URL's looks
like, and how we can determine from the clean url whether we redirect to
Lyceum or Drupal.

There are a number of approaches you could take, but the easiest (given
that you already have a Drupal based site) is to make all lyceum urls be
like myuser.mydomain.com/lyceum/... We'll then assume any url without
the /lyceum/ part is Drupal.

I'm not sure this is what you want though. From your description it
sounds like you want to take the approach that all Drupal urls will be
www.mydomain.com or mydomain.com, and all Lyceum URLs will be
myuser.mydomain.com. That is, Lyceum is anything other than www., and
Drupal is always www. or simply no www. The problem with this is going
to be the root of Lyceum would also be mydomain.com (ie, no www.), so
now we'd have to handle each case, or each page that Lyceum uses with no
subdomain prefix.

Again, decide on your approach, and then we can work on the .htacess rules.

> Thanks for your help to this point Dave, I am happy to make some financial
> contribution to you for any further assistance as I think you have gone
> above
>
This is not necessary. I'm helping because I want to not for financial
gain. I would suggest donating to the Lyceum project, but I don't think
they accept donations.

~ ~ Dave

John Neil wrote:
> Thanks so much for your reply Dave. I have reinstalled with latest nightly
> and your breakdown of the various rules is very, very helpful besides the
> fact that you have clearly outlined exactly the nub of the issue.
>
> I am using Drupal clean URLs with path auto modification which outputs
page
> (node) specific URLs according to node name.
>
> Eg
>
> Drupal base url: http://www.mydomain.com/about_us
> This is a static site so there is no user URL save for the system admin.
>
> My intention was for Lyceum to handle all blog functionality through
> subdomains and as you correctly state the final line
>
>
>> RewriteRule ^(.*) lyceum/$1 [QSA,L]
>>
>
> rewrites all requests to the lyceum/portal.php
>
> I am using 'user subdomains' as per
>
>> RewriteRule ^(.*) lyceum/$1 [QSA,L]
>>
>
> and things stand now where you indicate they would - that is all redirects
> go to lyceum/
>
> I also cannot load created user blogs via the assigned url eg
> newblog.mysite.com and I am guessing this is due to the rewrite rules
> currently in place.
>
> Thanks for your help to this point Dave, I am happy to make some financial
> contribution to you for any further assistance as I think you have gone
> above and beyond the call.
>
> -----Original Message-----
> From: lyceum-users-bounces AT lists.ibiblio.org
> [mailto:lyceum-users-bounces AT lists.ibiblio.org] On Behalf Of DaveG
> Sent: Thursday, 31 August 2006 12:16 PM
> To: John Neil
> Cc: lyceum-users AT lists.ibiblio.org
> Subject: Re: [Lyceum-users] .htaccess and redirects
>
> In your scenario I think the fundamental issue is how are you going to
> determine whether the URL gets treated as a lyceum URL or as a Drupal
> URL. This is important because your processing rules for each are
> different. In other words, what are the rules for Lyceum and Drupal url
> processing? What will Drupal URL's look like, and what will Lyceum URL's
> look like, and what do you want the user to see in the browser? If you
> can provide samples of the Drupal and Lyceum url's and how you want that
> URL rewritten it will be easier to help with the .htaccess rules.
>
> I'm looking for something like:
> Drupal base url: http://www.mydomain.com/index.php?q=1234
> Drupal user url: http://www.mydomain.com/drupal/file1
>
> Lyceum base url: http://www.mydomain.com/lyceum/......
> Drupal user url: http://www.mydomain.com/.....
>
>
>> # Various rewrite rules.
>> <IfModule mod_rewrite.c>
>> RewriteEngine On
>> RewriteCond %{HTTP_HOST} ^www\.(.*)
>> RewriteRule ^(.*) http://%1/$1 [R,L]
>>
>>
> These two lines handle any url requests to www.yourdomain.com and change
> it into yourdomain.com. In the case on lifehaiku we need this because we
> make use of Lyceums ability to store blogs like myblog.mydomain.com. Are
> you doing this on your site? If not remove those lines.
>
>
>> RewriteRule ^(.*) lyceum/$1 [QSA,L]
>>
>>
> This last line basically says to redirect *all* requests to the lyceum
> directory. The L directive at the end says to stop processing the
> .htaccess file after this rule. That's a problem since now we're not
> doing any Drupal stuff that follows. So remove that last line. The
> problem now is that no lyceum
>
>> <SNIP>
>>
>> # Rewrite current-style URLs of the form 'index.php?q=x'.
>> RewriteCond %{REQUEST_FILENAME} !-f
>> RewriteCond %{REQUEST_FILENAME} !-d
>> RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
>>
>>
> If the requested URL is not a file and it's not a directory then rewrite
> the url to the format index.php?q=xxxx. This is the Drupal processing.
> The problem again is that at no point have we determined a criteria for
> differentiating Drupal from Lyceum -- so they get handled the same way,
> which has to be wrong for one case at least.
>
> _______________________________________________
> Lyceum-users mailing list
> Lyceum-users AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/lyceum-users
>
>
>

_______________________________________________
Lyceum-users mailing list
Lyceum-users AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/lyceum-users





Archive powered by MHonArc 2.6.24.

Top of Page