subdirectories

Passenger+nginx: Hosting a Rails application in a subdirectory

I'm trying to deploy an application in a subdirectory /a under www.myserver.com, following the steps in the Passenger docs here: http://www.modrails.com/documentation/Users%20guide.html#deploying_rails_to_sub_uri This seems to work, but the Rails routes are now all expecting the additional subdirectory /a, such that trying to access the...

mod_rewrite: hierarchical sub-domains into hierarchical sub-directories

Hello. Consider the following problem, please. I have got domain.tld with hierarchical sub-domains like the following: a.domain.tld b.a.domain.tld c.b.a.domain.tld ... etc. There is also hypothetical directory structure in the web-root: /foo /a. /a./b. /a./b./bar /a./b./c. ... etc. I would like to achieve such rewrite that would ...

.htaccess mod_rewrite for nested folder structuring

Hello, I recently found an article online that told me about this: RewriteRule ^mock-up/([^/]+)/([^/]+) /mock-up/index.php?page=$1&section=$2 [NC] Only thing that is driving me crazy right now is if I want to be able to have the 2nd directory or not. Like: RewriteRule ^mock-up/([^/]+)/([^/]+) /mock-up/index.php?page=$1&section=$2 [...

Zend Framework : Subdirectories in controllers directory

Hi all, I'm using the Zend Framework for my website, and just created a special module "api" to create... Well, an API. Now, I have a lot of controllers in my module and I'd like to create subdirectories in this controllers directory in order to "tidy" it. My new structure would be something like this : - controllers/ - controllers...

Adding folders to a git repository while ignoring some subfolders

Im trying to add a directory "foo" to my repo, but there are some sub dirs lets call them "bar1", "bar2", "bar3" and "bar4" Now I want to add foo to my repo, while ignoring foo/bar2 and foo/bar3 is this possible? do i need to add them first and then remove the folders I dont want? ...

How do I create new subdirectories/folders withing my app bundle during runtime?

I am writing many files to disk, and I would like to split them up into different categories, but how do I do this? ...

C# Search for subdirectory (not for files)...

Every example I see seems to be for recursively getting files in subdirectories uses files only. What I'm trying to do is search a folder for a particular subdirectory named "xxx" then save that path to a variable so I can use it for other things. Is this possible without looping through all the directories and comparing by name? ...

Java: Possible to consolidate empty subdirectories for packages that only contain other packages?

Good afternoon, all. I'm not too hopeful for a "yes" here, but if anyone can figure it out, the folks at SO can. I have a Java project that has the following package structure: src |-net | |-binarymuse | |-gwt | |-client | | |-ui | | |-project | | |-Project.java | |-Project.gwt.xml |-overview.html I would...

Listing subdirectories 3 levels deep using LINQ C#

I'd like to know if there is a better alternative to my following code (preferably using LINQ) #region List and filter directories to only 3 levels deep // List all subdirectories within main directory string[] folders = Directory.GetDirectories(@"C:\pdftest\", "*" ,SearchOption.AllDirectories); ...

Moving and renaming files, keeping extension but include sub directories in batch file

Forgive me if this is nor the place to ask these questions, I am new to batch and scripts and a bit new to these kind of posts... I have a folder that will receive files and folders, I want to run a script that looks at the directory and renames all files in each subfolder numerically, and moves them if possible. For example I have s...

Using htaccess rewrite to make a subdirectory be its own root for root relative path requests

Can I use htaccess to capture requests from a certain subdirectory and make that directory use itself as the root directory for any root relative path requests? For example if I have... http://www.example.com/subFIXED/subANY/restofpath ...where subFIXED is always the same directory, subANY is any immediate subdirectory of subFIXED, an...

.htaccess rewrite subdirectories to null

Hello, I want the browser location bar to show http://dir/ when I really am in http://dir/subdir/subdir. How do I do that? Thanks in advance! ...

.htaccess: block a physical directory url but allow the url through a subdomain indirectly

So for security reasons, I want to disallow http://www.domain.com/directory/ but allow that physical directory only through http://subdomain.domain.com/directory/ The simple way would be to just move the directory, but I can't do it because it breaks the application, so how would I do this with .htaccess? I've temporarily blocked it u...

javascript: how to include file depending on subdirectory

Hi everyone, I need your help. I need to include external files (menu) on a template depending on the current sub directory. For ie; I have two sub directories: http://subdomain.domain.com/xx/index.html http://subdomain.domain.com/yy/index.html and each sub directory has own menu file. How to create this conditional script on JavaSc...

Url rewrites for unique site names in Wordpress Multi-site without subdomains or subdirectories?

Is there a way in multi-site WP3.0 to provide unique site names without using subdomains or subdirectories? For example, my multi-site name is sites-d.ourdomain, but I want the urls for each site instance to look like this: [site1].ourdomain (instead of sites-d.ourdomain/[site1] or [site1].sites-d.ourdomain) Our clients expect to have ...

HTML - pick images of Root Folder from Sub-Folder

lets say following is the DIR structure of my website Now in index.html i can simply refer images like <img src="./images/logo.png"> but what if i want to refer the same image fron sub.html what will be the src ...

How to Limit The Depth of a Recursive Sub-Directory Search

I've got a function that currently grabs all folders and sub-folders to check the ACL's for a small tool I'm building but I'm pulling my hair out trying to figure out how to limit the depth that it can go to. For example you have a folder that goes 4 levels deep but I want to be able to only grab 3 levels of it for ACL's. Currently I h...

PHP Include() whole subdirectory with jQuery navigation bar

Hi, I have a subdirectory folder called /lefnav It contains this files: background.jpg demo.html heading_bg.jpg jquery.js navigation.jpg sliding_effect.js styles.css tab_bg.jpg Thumbs.db Thumbs.db/encryptable It actually contains al the elements of this tutorial: http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-moo...

How to check if a specific file exists in directory or any of its subdirectories

In C#, how do I check if a specific file exists in a directory or any of its subdirectories? System.IO.File.Exists only seems to accept a single parameter with no overloads to search subdirectories. I can do it with LINQ and System.IO.Directory.GetFiles using the SearchOption.AllDirectories overload, but that seems a bit heavy han...