Where should an `.htaccess` file be located? [closed] - .htaccess

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I noticed that I had two .htaccess file on my website's server, one in the root folder, one in the www folder. Which one is active and which one should I delete?

You put the .htaccess in the folder whose behavior you want to alter. This also affects the behavior of all the sub-folders. It can happen that you want different behavior for one or more of the sub-folders in which case you give them their own .htaccess file and override the settings that are not to be inherited from the parent.

Related

Map a folder in depot to another folder in depot [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a bin folder which contains an external compiler. This bin folder is common to 3 projects. Is there a way to point the bin folder to a general bin folder in the depot so I do not duplicate the folder?
I'd suggest a depot layout something like this:
//depot/common/...
//depot/project1/...
//depot/project2/...
//depot/project3/...
Check in your compiler under //depot/common somewhere and have your clients map the project(s) needed and the common directory.

What are circular symlinks in Unix-like systems used for? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I was browsing a directory on a Linux machine, and when doing a detailed listing I noticed that a link is pointing to itself, for example:
somelink -> /path/to/directory/somelink
I am wondering what is the reason for doing such a thing?
If the somelink is in /path/to/directory then this is an invalid symlink. If you try to access it, the filesystem will give you an error (probably something like too many levels of symbolic links*). It could have been a typo (or some other mistake) when it was created, or the symlink got moved somehow and ended up linking to itself.
There's no good reason for a circular symlink. Most probably, it was created by accident.

What is up with Linux and Apache's ".d"? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Linux and Apache suffix a bunch of files and folders with d or .d.
init.d
rc.d
/etc/httpd/conf.d
/etc/httpd/vhost.d
What is the meaning of this convention?
It means simply "directory" and commonly indicates that either a single file, or a directory full of them is acceptable for configuration.
(In the case of rc.d, that replaces the old-style Unix /etc/rc script which is no longer used on Linux.)
Means "a directory", containing a bunch of files intended for the same goal (init scripts in init.d, configuration files in conf.d, etc.) - this tendency seems to have expanded onto separate files, too.

.htaccess to allow #fontface [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am using the master .htaccess from http://docs.joomla.org
Its working well but its also locking out all my woff|eot|svg|ttf
How can I add these to the allowed filetypes?
My fonts reside in /templates/mytemplate/css/type/ folder
I believe this is the line in question:
## Allow limited access for certain Joomla! system directories with client-accessible content
RewriteRule ^(components|modules|plugins|templates)/([^/]+/)*([^/.]+\.)+(jp(e?g|2)?|png|gif|bmp|css|js|swf|html?|mp(eg?|[34])|avi|wav|og[gv]|xlsx?|docx?|pptx?|zip|rar|pdf|xps|txt|7z|svg|od[tsp]|flv|mov)$ - [L]
Basically, in certain folders - including the templates/ folder, only certain file types are being allowed and your files aren't in the list. Adding them in the final bracketed clause pipe separated should do the job. Something like...
RewriteRule ^(components|modules|plugins|templates)/([^/]+/)*([^/.]+\.)+(jp(e?g|2)?|png|gif|bmp|css|js|swf|html?|mp(eg?|[34])|avi|wav|og[gv]|xlsx?|docx?|pptx?|zip|rar|pdf|xps|txt|7z|svg|od[tsp]|flv|mov|woff|eot|svg|ttf)$ - [L]

Use of /etc/passwd-, /etc/shadow-, /etc/group- [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
In addition to the files : /etc/group, /etc/passwd and /etc/shadow, I could see three files in my linux machine.
/etc/group-
/etc/passwd-
/etc/shadow-
I cannot see these files in my root filesystem. But when I try to add one user using useradd command, these files seem to get generated.
So i would like to know when exactly is these files created and what is the use of these files?
These are backups of previous versions.
Manual pages show these files and states:
/etc/passwd-
Backup file for /etc/passwd.
/etc/shadow-
Backup file for /etc/shadow.
Note that this file is used by the tools of the shadow toolsuite, but not by all user and password management tools.
See http://manpages.ubuntu.com/manpages/oneiric/man5/shadow.5.html and http://manpages.ubuntu.com/manpages/oneiric/man5/passwd.5.html

Resources