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: htaccess for slaves
#9657
htaccess for slaves 12 Years ago Karma: 0
Should slave sites have their own "copy" of .htaccess rather than symbolic link to the master?
mulligan
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#9664
Re: htaccess for slaves 12 Years ago Karma: 54
When you need exactly the same htaccess, you can use a Symbolic Link.
Sometime, you need to have your specific htaccess file to change some rule. In this case, you must use a copy.

So this will depends on your needs.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#9678
Re: htaccess for slaves 12 Years ago Karma: 0
If we use a symbolic link for the slave sites in the template however decide later to copy the actual .htaccess file into a specific slave site deployment directory, will the actual file just override the symbolic link file without any issues?
TonyGee
Expert Boarder
Posts: 113
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#9686
Re: htaccess for slaves 12 Years ago Karma: 54
If you want to replace a Symbolic Link by a physical copy, you need to delete the link manually before installing the copy.

JMS does not change existing things. So when a symbolic link is already created, it will remain until you delete it manually.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#12444
Re: htaccess for slaves 8 Years, 10 Months ago Karma: 0
It would be helpful if you were to post the procedure for deleting the symbolically linked htaccess file from a slave. I just tried to delete it via FTP and it re-appeared. I don't see any obvious place to do it in the master Components/Multisites.

******* UPDATE: *******

It turns out that when I deleted the .htaccess symbolic link in my slave site and it mysteriously reappeared, it had broken it and the slave site no longer worked.

I learned that there are other ways to do this, but I was able to search for the broken link using this command in SSH:

Code:

find -L /path_to_broken_symlink -type l


And I was able to find it and delete it with confirmation using this command:

Code:

find -L /path_to_broken_symlink -type l -exec rm -i {} +


In my case, I wanted to replace the symbolically linked htaccess file with a real file so I could do so 301 redirects for the slave site.

All set now.
azurelink
Expert Boarder
Posts: 87
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2015/05/14 19:55 By azurelink.
The administrator has disabled public write access.
 
#12449
Re: htaccess for slaves 8 Years, 10 Months ago Karma: 54
I don't know who generate the .htaccess automatically.
Normally, the delete of a file and symbolic link can be done with FTP or SSH command.

If after the update, you perform an Open/Save of a slave site definition, this may recreate the .htaccess in case where you have defined it as a symbolic link inside the JMS template rule associated with this slave.
What you can do is to setup the JMS template to "ignore" the creation of the .htaccess.

You mentioned broken links and I don't know who you setup the JMS templates concerning the way to compute the symbolic link.
By default, JMS use the full real physical path to the files and folders.
So the links should be OK as long as you don't move the master files.

An alternate solution is to use relative path that you can also setup in JMS template.
In this case, in the "source column", setup the way to compute the path for the symbolic link. The keyword {file} can be used in the "source" column and correspnod to current folder/file name column
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
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