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: Thu, 31 Aug 2006 10:45:16 +1000

Hi Dave, thanks for the reply

I am using Drupal in the root and this is the root index.php. I tried moving
it into the lyceum dir but returned 500 error. There will be an obvious
class in the rewite rules to those who know what they are looking at but it
is well beyond my level of knowledge. I have included my .htaccess file
below.

## Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch
"(\.(engine|inc|install|module|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\
.pl|Entries.*|Repository|Root)$">
Order deny,allow
Deny from all
</FilesMatch>

# Set some options.
Options -Indexes
Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1
<IfModule mod_php4.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>

# PHP 4, Apache 2
<IfModule sapi_apache2.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>

# PHP 5, Apache 1 and 2
<IfModule mod_php5.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>

# Reduce the time dynamically generated pages are cache-able.
<IfModule mod_expires.c>
ExpiresByType text/html A1
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule ^(.*) http://%1/$1 [R,L]
RewriteRule ^(.*) lyceum/$1 [QSA,L]

# If your site can be accessed both with and without the prefix www.
# you can use one of the following settings to force user to use only one
option:
#
# If you want the site to be accessed WITH the www. only, adapt and
uncomment the following:
# RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
# RewriteRule .* http://www.example.com/ [L,R=301]
#
# If you want the site to be accessed only WITHOUT the www. , adapt and
uncomment the following:
# RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
# RewriteRule .* http://example.com/ [L,R=301]


# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
#RewriteBase /drupal

# Rewrite old-style URLs of the form 'node.php?id=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]

# Rewrite old-style URLs of the form 'module.php?mod=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]

# 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]
</IfModule>

# $Id: .htaccess,v 1.73 2006/04/14 09:08:26 killes Exp $

-----Original Message-----
From: DaveG [mailto:lyceum AT solidgone.com]
Sent: Wednesday, 30 August 2006 9:25 PM
To: John Neil
Cc: 'Adam Lindsay'; lyceum-users AT lists.ibiblio.org
Subject: Re: [Lyceum-users] .htaccess and redirects

John Neil wrote:
> Dave
>
> I have just tried to leave a comment on Nepherim but it is not submitting.

>
Identified as being a problem with the themes Ajax commenting. I'll fix
it in a few days.

> For those that could help my comment was that after trying the updated
> rewrite rules my site redirects to
> http://www.w3.org/Protocols/
>
> any explanation for this?
>
> I have the same directory structure as the Nepherim instructions but I
have
> a php index in the root for my front page.
If you're using the exact same .htaccess, then you need the index.php
file inside the lyceum directory. The root level index.php will not be
processes. As to why it's forwarding to w3, I don't know. What do you
have inside index.php? Do you have a url we can look at?

~ ~ Dave (aka Nepherim)





Archive powered by MHonArc 2.6.24.

Top of Page