[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] RedirectMatch question (Raq4)
- Subject: Re: [cobalt-users] RedirectMatch question (Raq4)
- From: "PageKeeper Service" <host@xxxxxxxxxxxxxxxxxxxxx>
- Date: Thu Oct 16 13:32:07 2003
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
----- Original Message -----
Subject: [cobalt-users] RedirectMatch question (Raq4)
> After searching a lot I give up.
> I changed all pages in a site from .html to .php
>
> I wrote an .htaccess in the root (all pages are in root directory):
> RedirectMatch permanent (.*)\.html$ http://www.mysite.nl$1.php
>
> It gives an internal server error.
>
> Should I change anything in httpd.conf?
>
> Thanks,
>
> Gerard
>
> httpd.conf:
> <VirtualHost 213.19.128.220>
> ServerName www. mysite.nl
> ServerAdmin admin
> DocumentRoot /home/sites/site7/web
> ServerAlias wrakkenmuseum.nl www. mysite.nl
> RewriteEngine on
> RewriteCond %{HTTP_HOST} !^213.19.128.220(:80)?$
> RewriteCond %{HTTP_HOST} !^www. mysite.nl(:80)?$
> RewriteRule ^/(.*) http://www. mysite.nl/$1 [L,R]
> RewriteOptions inherit
> AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site7/users/$1/web/$3
> AddType application/x-httpd-php .php3
> AddType application/x-httpd-php .php4
> AddType application/x-httpd-php .php
> AddHandler cgi-wrapper .cgi
> AddHandler cgi-wrapper .pl
> </VirtualHost>
This seems to work on a fully patched raq4i.
The directive to to use in httpd.conf within the VirtualHost section of a
site.
<Directory /home/sites/site3/web>
AllowOverride None
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
This Example added to the below so a single ssl cert can be used and
.htaccess
NameVirtualHost 69.69.69.69
<VirtualHost 69.69.69.69>
ServerName yo.mamma.com
ServerAdmin site3
DocumentRoot /home/sites/site3/web
ServerAlias yo.mamma.com
<Directory /home/sites/site3/web>
AllowOverride None
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^69.69.69.69(:80)?$
RewriteCond %{HTTP_HOST} !^yo.mamma.com(:80)?$
RewriteRule ^/(.*) http://yo.mamma.com/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site3/users/$1/web/$3
# AddHandler chiliasp .asp
# AddHandler chiliasp .asa
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php
ScriptAlias /cgi-bin/ /home/sites/site3/web/cgi-bin/
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
</VirtualHost>
then open and modify the access.conf to match the directive as in the
example below and add the directives
'AllowOverride AuthConfig Indexes Limit FileInfo' to it like below. this
alone may fix your problem if no ssl is used.
# be more restrictive within a site ..rather be less restrictive
<Directory /home/sites/*/>
Options -FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride AuthConfig Indexes Limit FileInfo
</Directory>
PageKeeper Service
http://www.pagekeeperservice.com