httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J.Greenlees <ja...@x-mail.net>
Subject Re: [users@httpd] mod_rewrite for user homepages problem
Date Mon, 12 Jan 2004 04:58:51 GMT
Chris,
just use mod_userdir to make sure the new structure works.
give the functionality through a set of public_html directories instead of 
rewriting everything.

Quoting Chris Blackwell <chris.blackwell@blueyonder.co.uk>:

> Hi,
> 
> I am working on a rebuild of a site for a client.  They operate local
> business directories, they have 8 domains and offer their business space to
> put a few pages, which are linked to from the entry in the directory.
> 
> Currently the 8 sites have seperate docroots and each of the businesses 
> get
> a directory off of the docroot.. like:
> 
> www.domainA.com/businessX
> www.domainB.com/businessY
> 
> I am pulling all the domains to use a single set of coldfusion templates
> (and one database, not 8!) and wanted to reorganise the directory structure
> a bit.
> 
> I need www.domainB.com/businessY to be rewritten to
> /_homepages/www.domainB.com/businessY.  I also have a list of common
> directories to exclude, any .cfm templates in the root directory need to be
> accessed as normal and requests without a file need to use the
> directoryindex directive to pickup the correct index file.
> 
> Below is the vhost i have so far, its not working as it rewrites everything
> to /_homepages/...
> 
> Any suggestion.. ?
> 
> Thanks, Chris
> 
> 
> 
> <VirtualHost 192.168.100.100>
> 	UseCanonicalName off
> 	ServerName ukcd
> 	DocumentRoot /var/www/html/ukcd/
> 	ServerAlias dundeecd edinburghcd elgincd glasgowcd invernesscd perthcd
> stirlingcd aberdeencd
> 	DirectoryIndex index.cfm index.html
> 
> 	RewriteEngine On
> 	# rewrite rules for search engine friendly urls
> 	RewriteRule ^/category/([0-9]+)(.*) /category.cfm\?c=$1 [PT]
> 	RewriteRule ^/browse/([a-zA-Z]+)(.*) /browse.cfm\?s=$1 [PT]
> 	RewriteRule ^/entry/([0-9]+)(.*) /entry.cfm\?e=$1 [PT]
> 	RewriteRule ^/swapdir/([0-9]+)/([0-9]+) /index.cfm\?cfid=$1&cftoken=$2
> [PT]
> 
> 	RewriteRule ^/login/ /_include/login.cfm [PT]
> 	RewriteRule ^/logout/ /_include/logout.cfm [PT]
> 
> 	RewriteMap    lowercase    int:tolower
> 
> 	RewriteRule ^/images/header/.*
> /_homepages/${lowercase:%{HTTP_HOST}}/_header/$1 [PT]
> 
> 	RewriteCond   %{REQUEST_URL}  !^/
> 	RewriteCond   %{REQUEST_URL}  !^/.*\.cfm
> 	RewriteCond   %{REQUEST_URL}  !^/_include/.*
> 	RewriteCond   %{REQUEST_URL}  !^/_homepages/.*
> 	RewriteCond   %{REQUEST_URL}  !^/account/.*
> 	RewriteCond   %{REQUEST_URL}  !^/admin/.*
> 	RewriteCond   %{REQUEST_URL}  !^/CFIDE/.*
> 	RewriteCond   %{REQUEST_URL}  !^/components/.*
> 	RewriteCond   %{REQUEST_URL}  !^/css/.*
> 	RewriteCond   %{REQUEST_URL}  !^/headers/.*
> 	RewriteCond   %{REQUEST_URL}  !^/import_scripts/.*
> 	RewriteCond   %{REQUEST_URL}  !^/profile/.*
> 	RewriteCond   %{REQUEST_URL}  !^/register/.*
> 	RewriteCond   %{REQUEST_URL}  !^/scripts/.*
> 	RewriteRule ^/(.*)$   /_homepages/${lowercase:%{HTTP_HOST}}/$1
> </VirtualHost>
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 


-------------------------------------------------------------------------------------------
***Protect your PC from local E-Mail Application security holes***
***Maintain your Privacy - MS Passport Free***
***Anti SPAM "Whitelist" feature***

http://www.x-mail.net Web E-Mail, accessible anywhere, 128 bit SSL Secure

Voice Messages, Voice Calls (VoIP), Video Conferencing, Live Chat, 
X-Mail Messenger, Personal Web Hosting, Private Disk Storage,  
Calendar, Bookmarks, Forwarding, Virtual Mail Map Aliasing

X-Mail Premium: 20 - 250MB Storage, 20MB Messages, SMTP, POP3, Ad Free
Starting at $9.95 per year
-------------------------------------------------------------------------------------------
Anonymous Web Surfing http://www.snoopblocker.com
Search http://www.teradex.com
  




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message