English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: Code in .htaccess
#3293
Code in .htaccess 14 Years, 3 Months ago Karma: 0
Edwin. We have set up school district 82 (www.cmsd82.bc.ca) with sub domains for every school. Works wonders. However we have some schools with existing sites that they want to keep until their subscriptions run out. So we thought we'd just dummy up the school district site, and put a redirect to their existing site by putting the following in the .htaccess file for the school.

e.g. ########## Begin - Redirecting non-www request to www
#
RewriteEngine On
RewriteCond %{HTTP_HOST} ^roywilcox.cmsd82.bc.ca [NC]
RewriteRule (.*) www.roywilcoxschool.com////$1 [L,R=301]
#
########## End - Redirecting non-www request to www

However, changing one .htaccess file changes all - so in the end, we can only redirect one school. Is there a better way to do this?

Thanks, Edwin

Doug Thomson
doc_in_bc
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#3298
Re: Code in .htaccess 14 Years, 3 Months ago Karma: 54
If you have deployed the slave site into a specific directory, you can have as many ".htaccess" than you have slave site.
So you just have to remove the Symbolic Link to the master and replace the specific file with a physical copy.

When you create the slave site, you can use a JMS templates where you specify that you want to copy the ".htaccess" instead of create a Symbolic Link that is the default.
You can do the same with the "robots.txt" if you decide to create additional directories in the slave site.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#3303
Re: Code in .htaccess 14 Years, 3 Months ago Karma: 0
So, am I to presume we simply delete the .htaccess (symbolic link) in each sub-domain folder and replace it with an .htaccess file that is a real file?

Thanks, again

Doug Thomson

Done! Works perfectly, many thanks.
doc_in_bc
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/02/14 02:20 By doc_in_bc.
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla