Mod_Rewrite and siteaccess hell please help

Author Message

Dan C

Thursday 03 February 2005 12:27:10 pm

Hi,

I've just spend the last 5 hours searching the documentation and forums and I can't figure out a resolution to my problem. Here is my setup:

One site: http://www.example.com/

Code excerpts below

my current site.ini.append:

[SiteSettings]
DefaultAccess=homes
SiteList[]
SiteList[]=homes

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=homes
AvailableSiteAccessList[]=homes_admin
MatchOrder=uri
HostMatchMapItems[]

siteaccess/homes/site.ini.append AND siteaccess/homes_admin/site.ini.append

[SiteSettings]
SiteName=Mike Koszo
SiteURL=koszo.darpa.org/index.php
LoginPage=embedded

Now, this *used* to work, and i could go to urls like:
http://www.example.com/index.php/homes/
http://www.example.com/index.php/homes/etc
http://www.example.com/index.php/homes_admin/

I then added into my httpd.conf:

RewriteEngine On
RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages|^/packages|^/share/icons).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf)$ /index.php

and it seems to be working fine.

Now, when i try and change my settings/override/site.ini.append to:

[SiteSettings]
DefaultAccess=homes
SiteList[]
SiteList[]=homes

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=homes
AvailableSiteAccessList[]=homes_admin
MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=koszo.darpa.org;homes
HostMatchMapItems[]=www.koszo.darpa.org;homes
HostMatchMapItems[]=admin.koszo.darpa.org;homes_admin

Direct urls will now work, ie:
http://www.example.com/etc
http://admin.example.com/
BUT
urls like:
http://www.example.com/index.php/homes/etc
or
http://admin.example.com/index.php/homes_admin/
will NOT work. This unfortunately breaks most of the controls in the admin, and breaks a lot of links inside my content. Also for some other reason, I was unable to load jpg/gifs etc...

Now... I've gone back to my original setup, and now I can not login to the admin system.
when I go to http://www.example.com/index.php/homes_admin/ it loads fine, but the form tries to post to "/user/login" and then redirects me to "/" and it logs me into the /homes/ siteaccess instead of the homes_admin siteacess.

I've tried clearing the cache (./bin/shell/clear-cache.sh --clear-all) multiple times but this has not helped.

Does anyone know what I'm doing wrong? Any help would be greatly appreciated. Ideally I would like to have the second setup working with all the following urls working:

http://www.example.com/
http://admin.example.com/
http://www.example.com/index.php/homes/
http://admin.example.com/index.php/homes_admin/
http://www.example.com/homes/
http://admin.example.com/homes_admin/

Or perhaps there is a different way to clear admin cache? Anyhow, I hope someone can help.

Thanks,

Dan

Dan C

Thursday 03 February 2005 12:51:09 pm

it appears as though the /var/ directory is not all cleared out of cached files with clear-cache.sh utility. I had to manually delete some files in there before the admin would work again.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 21:44:34
Script start
Timing: Jan 30 2025 21:44:34
Module start 'layout'
Timing: Jan 30 2025 21:44:34
Module start 'content'
Timing: Jan 30 2025 21:44:34
Module end 'content'
Timing: Jan 30 2025 21:44:34
Script end

Main resources:

Total runtime0.0218 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.3828151.2422
Module start 'layout' 0.00550.0034 739.6250220.7500
Module start 'content' 0.00900.0115 960.3750997.8828
Module end 'content' 0.02050.0013 1,958.257833.9922
Script end 0.0218  1,992.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002310.7133140.0002
Check MTime0.00104.4593140.0001
Mysql Total
Database connection0.00062.599110.0006
Mysqli_queries0.003415.687430.0011
Looping result0.00000.045910.0000
Template Total0.00104.410.0010
Template load0.00073.419910.0007
Template processing0.00020.985910.0002
Override
Cache load0.00052.343310.0005
General
dbfile0.00136.088980.0002
String conversion0.00000.032840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs