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: Fri, 01 Sep 2006 12:40:10 +1000

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





Archive powered by MHonArc 2.6.24.

Top of Page