Search Results

Search found 373 results on 15 pages for 'subdirectories'.

Page 1/15 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Listing subdirectories 3 levels deep using LINQ C#

    - by paradox
    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); List<string> subdirectories = new List<string>(); //Filter away all main directories, now we are left with subdirectories 3 levels deep for (int i = 0; i<folders.Length; i++) { int occurences = folders[i].Split('\\').Length-1; if (occurences==4) subdirectories.Add(folders[i]); } #endregion

    Read the article

  • Grep through subdirectories

    - by Kathryn
    Add a string to a text file from terminal I've been looking at this thread. The solution (number 2, with ls | grep) works perfectly for files called .txt in the current directory. How about if I wanted to search through a directory and the subdirectories therein? For example, I have to search through a directory that has many subdirectories, and they have many subdirectories etc. I'm new to Linux sorry, so I'm not sure if this is the right place

    Read the article

  • Kohana3 Route with Subdirectories in Controller Folder

    - by ahmet2106
    Hello everybody I'm using Kohana for so long, but the new Version is a litte bit other. My problem with an example: classes/ controller/ pages.php pages/ imprint.php I want to change my Route so, that if i call domain.tld/pages, the pages.php should called with action_index(). But if i call domain.tld/pages/imprint, pages/imprint.php should called with action_index() (and this should work too: pages/imprint/demo - action_demo() in pages/imprint.php) Tried this with bootstrap and http://kohanaframework.org/guide/api/Route this examples, but cant get it work. How can i make this? Any help? Thanks Closed: was my fault The Route::set('pages'...) must be before Route::set('default'...);

    Read the article

  • How to Organize Subdirectories? [closed]

    - by Gary Iverson
    I am working on my first major (several hundred pages) website design and development project. I want to create subdirectories for each of the website's categories, which in turn have their own subdirectories for easy user navigation. Example: website.com/directory. I am aware that by placing an index.html file within each directory, the browser automatically detects and navigates to that page, but that seems like a messy solution (having multiple index.html files, albeit in distinct folders), and I cannot imagine everyone does that. So my question is...how do you properly organize and use subdirectories?

    Read the article

  • How to handle non-existent subdirectories?

    - by Question Overflow
    I have a dynamic website with friendly URLs. Example: Instead of /user.php?id=123, I have /user/123 Instead of /index.php?category=fishes, I have /fishes But, how do I handle non-existent subdirectories such as /about/123? Currently it gives a 200 success instead of a 404 not found error. Is there a way to deal with non-existent subdirectories in Apache config and at the same time allow for friendly URLs? Or do I have to handle this individually for each PHP script?

    Read the article

  • mod_secdownload in lighttpd support subdirectories for secure stream?

    - by zomail
    i want to know that lighttpd supports secure stream for subdirectories ? I want to secure my subdirectories within a directory but looks like its not working on subdirectories . I want to secure my subdirectories within download-area directory given below secdownload.secret = "MySecretSecurePassword" secdownload.document-root = "/home/lighttpd/download-area/" secdownload.uri-prefix = "/dl/" secdownload.timeout = 3600

    Read the article

  • How do I configure IIS 7 (discount asp.net) to point subdomains at application subdirectories?

    - by m4bwav
    I have an discount asp.net account, which uses IIS 7 and I want to configure subdomains to point at specific applications on the site. For instance: 's1.site.com' would run the application at 'site.com/serverone'. I would like the subdomain to be opaque so that users do not have to deal with the /serverone part. There was a similar question on server fault, but it involves creating a whole new site for each subdomain, where as I would rather just create independent websites.

    Read the article

  • cifs mounted NAS drive treats subdirectories as files

    - by Mike Krejci
    I have a NAS drive mounted in my fstab as follows: //192.168.0.182/Videos /mnt/NAS_02 cifs iocharset=utf8,uid=65534,gid=65534,guest,rw 0 0 It mounts fine, and in the terminal using cd and ls you can view all the files and navigate all the directories. However, in any other program all subdirectories in the mnt/NAS drive are treated as files and I can't open them up. A tree like this for example: /Movies /Comedy /Drama Movie.mp4 I can enter the directory /Movies, but the directories /Movies/Comedy and /Movies/Drama show up as files and I can't enter them. The permissions are all fine. I just upgraded UBUNTU and was using smbfs on the same system before and it worked fine. It's under cifs that it no longer works. Any thoughts, I can't seem to find any solutions.

    Read the article

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

    - by BinaryMuse
    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 like to consolidate the empty subdirectories in the src/ folder so that instead of /src/net/binarymuse/gwt/client/ui/project/ I'd have /src/net.binarymuse.gwt/client.ui.project/. Is this possible? Thanks.

    Read the article

  • Use Apache authentication + authorization to control access to Subversion subdirectories

    - by Stefan Lasiewski
    I have a single SVN repo at /var/svn/ with a few subdirectories. Staff must be able to access the top-level directory and all subdirectories within it, but I want to restrict access to subdirectories using alternate htpasswd files. This works for our Staff. <Location /> DAV svn SVNParentPath /var/svn AuthType Basic AuthBasicProvider ldap # mod_authnz_ldap AuthzLDAPAuthoritative off AuthLDAPURL "ldap.example.org:636/ou=people,ou=Unit,ou=Host,o=ldapsvc,dc=example,dc=org?uid?sub?(objectClass=PosixAccount)" AuthLDAPGroupAttribute memberUid AuthLDAPGroupAttributeIsDN off Require ldap-group cn=staff,ou=PosixGroup,ou=Unit,ou=Host,o=ldapsvc,dc=example,dc=org </Location> Now, I am trying to restrict access to a subdirectory with a separate htpasswd file, like this: <Location /customerA> DAV svn SVNParentPath /var/svn # mod_authn_file AuthType Basic AuthBasicProvider file AuthUserFile /usr/local/etc/apache22/htpasswd.customerA Require user customerA </Location> I can use Firefox and curl to browse to this folder fine: curl https://svn.example.org/customerA/ --user customerA:password But I cannot use check out this SVN repository: $ svn co https://svn.example.org/customerA/ svn: Repository moved permanently to 'https://svn.example.org/customerA/'; please relocate And on the server logs, I get this strange error: # httpd-access.log 192.168.19.13 - - [03/May/2010:16:40:00 -0700] "OPTIONS /customerA HTTP/1.1" 401 401 192.168.19.13 - customerA [03/May/2010:16:40:00 -0700] "OPTIONS /customerA HTTP/1.1" 301 244 # httpd-error.log [Mon May 03 16:40:00 2010] [error] [client 192.168.19.13] Could not fetch resource information. [301, #0] [Mon May 03 16:40:00 2010] [error] [client 192.168.19.13] Requests for a collection must have a trailing slash on the URI. [301, #0] My question: Can I restrict access to Subversion subdirectories using Apache access controls? DocumentRoot is commented out, so it's not clear that the FAQ at http://subversion.apache.org/faq.html#http-301-error applies.

    Read the article

  • Disallow everything in directory except subdirectories with certain name using .htaccess or vhost.conf

    - by Jizbo Jonez
    How can I disallow everything in a directory except any subdirectories that have a certain name using htaccess or even vhost.conf for the site? I have a protected main directory which contains subdirectories. Each of the subdirectories have another child dir named 'thumbs', that I want to allow people access to. In the thumbs folder I have files which all start with 'thumb_' prefix for the filename. So which approach to use, .htaccess FilesMatch or vhost DirectoryMatch? and what would be the code to use? Thanks

    Read the article

  • Webmaster Tools: root and subdirectories?

    - by nick
    We have all our international sites on our .com domain like this: site.com/uk site.com/us etc... When creating the sites in Webmaster Tools I've created different sites and submitted sitemaps for each directory so that we can appropriately geotarget the site. Is it also recommended to add the root .com with its geotargeting set to international? If so should I also add all the seperate site maps (like the /us/sitemap.xml) even though they have been added to the directory level sites?

    Read the article

  • Deleting ASP.NET application subdirectories causes application recycle!

    - by geekrutherford
    This may not be news to most people, but was definitely a shock to me!   In the .NET 2.x framework a "feature" was implemented where by an ASP.NET application is automatically recycled if any subdirectory is deleted. This was apparently implemented to prevent stale content from appearing on a site.   The unfortunate side effect of this "feature" is that when using the "InProc" model for session management, all session data is lost if a subdirectory is deleted.   For those who progammatically may be adding/deleting directories within their application as inherent functionality, this causes a rather large problem.   The solution? Create your folder(s) which may be programmatically deleted outside of the root folder for the application. Alernatively, utilize a file based structure vs. folders since deleting files does not result in the same issue.

    Read the article

  • Redirecting requests for .html pages in subdirectories to the same page in root with .htaccess

    - by Asherion
    I am porting a site from an old version of a CMS to a newer version which has different page addressing techniques. I'm unfortunately not very good with htaccess at all. URL/blog/sublblog/article.html is now simply URL/article.html Unfortunately, this will destroy any linking programs they have going, and break all the old links. I need a way to use .htaccess say: if request = /(any subdirectory)/(string).html then redirect to /(string).html If that makes any sense.

    Read the article

  • Script for creating directories and subdirectories on SBS 2008

    - by Rich Piedmont
    I have a small business server 2008 and have a directory named LAWFILES. I have a 6 digit file system (eg 106568) and I create a directory to store anything to do with the file (documents, outlook emails, PDFs, WAV files, ect.) I group 100 files in a 4 digit directory (eg 1065) for quicker access. My new years resolution is to organize these directories. I used to have a script the batch created directories and sub directories but it didn't work the last time I tried it (2 years ago). I would like to run a batch file that would ask for the 4 digit directory name (eg 1065) and then create that directory and 100 subdirectories (106500 - 106599) each of which contained subdirectories named "Documents," "Correspondence" & "Email-Voicemail" Can anyone suggest where I would go to find a scripting language that would be available to accomplish this? Thanks for the Help. Rich Piedmont

    Read the article

  • Mod Rewrite Help - Pseudo-Subdirectories

    - by Gimpyfuzznut
    I am dealing with a frustrating problem with Joomla that is going to require some url trickery. The idea is straight-forward but after reading a bunch of guides for mod-rewrite, I still can't seem to get it work. Let's say my site is www.mysite.com. Joomla is already performing some rewriting for SEF urls so I have links like www.mysite.com/home and www.mysite.com/news and so on. I want to be able to have (4) pseudo-subdirectories like www.mysite.com/mode1/ and www.mysite.com/mode2/ and so on. These subdirectories should work as if the subdirectory isn't there, ie both www.mysite.com/mode1/home and www.mysite.com/mode2/home should pull up the same www.mysite.com/home. It should point any www.mysite.com/mode1/anypagehere to www.mysite.com/anypagehere. The reason I am asking for this is because I will be reading the url for mode1, mode2, etc, to modify the template page. There will be a landing page that will direct people to /mode1/ and /mode2/ etc and the template will change based on that. Note, that I don't want to actually pass a parameter to the url accessible by a GET or whatever because Joomla removes it (perhaps because of my current mod_rewrite settings). I've pasted the current .htaccess file. RewriteBase /joomla ##########Rewrite rules to block out some common exploits RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR] # Block out any script trying to base64_encode crap to send via URL RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] # Block out any script that includes a <script> tag in URL RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] # Block out any script trying to set a PHP GLOBALS variable via URL RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] # Block out any script trying to modify a _REQUEST variable via URL RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) # Send all blocked request to homepage with 403 Forbidden error! RewriteRule ^(.*)$ index.php [F,L] ########## Begin - Joomla! core SEF Section RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/index.php RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC] RewriteRule (.*) index.php #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] ########## End - Joomla! core SEF Section

    Read the article

  • Use Apache authentication to Segregate access to Subversion subdirectories

    - by Stefan Lasiewski
    I've inherited a Subversion repository, running on FreeBSD and using Apache2.2 . Currently, we have one project, which looks like this. We use both local files and LDAP for authentication. <Location /> DAV svn SVNParentPath /var/svn AuthName "Staff only" AuthType Basic # Authentication through Local file (mod_authn_file), then LDAP (mod_authnz_ldap) AuthBasicProvider file ldap # Allow some automated programs to check content into the repo # mod_authn_file AuthUserFile /usr/local/etc/apache22/htpasswd Require user robotA robotB # Allow any staff to access the repo # mod_authnz_ldap Require ldap-group cn=staff,ou=PosixGroup,ou=foo,ou=Host,o=ldapsvc,dc=example,dc=com </Location> We would like to allow customers to access to certain subdirectories, without giving them global access to the entire repository. We would prefer to do this without migrating these sub-directories to their own repositories. Staff also need access to these subdirectories. Here's what I tried: <Location /www.customerA.com> DAV svn SVNParentPath /var/svn # mod_authn_file AuthType Basic AuthBasicProvider file AuthUserFile /usr/local/etc/apache22/htpasswd-customerA Require user customerA </Location> <Location /www.customerB.com> DAV svn SVNParentPath /var/svn # mod_authn_file AuthType Basic AuthBasicProvider file AuthUserFile /usr/local/etc/apache22/htpasswd-customerB Require user customerB </Location> I've tried the above. Access to '/' works for staff. However, access to /www.customerA.com and /www.customerB.com does not work. It looks like Apache is trying to authenticate the 'customerB' against LDAP, and doesn't try local password file. The error is: [Mon May 03 15:27:45 2010] [warn] [client 192.168.8.13] [1595] auth_ldap authenticate: user stefantest authentication failed; URI /www.customerB.com [User not found][No such object] [Mon May 03 15:27:45 2010] [error] [client 192.168.8.13] user stefantest not found: /www.customerB.com What am I missing?

    Read the article

  • CVS: Modules vs Subdirectories

    - by Glaxalg
    Does anyone know what is the best approach to define structure of modules/directories in CVS? Specifically what if I have big project that could possibly has many sub-projects (even not related). Is it better to define module for each sub-project or use subdirectories: Approach #1 Modules CVSROOT Main Project Platform A Sub-project1 Platform A Sub-project2 Platform B Sub-project3 ... Approach #2 subdirectories CVSROOT Project Main Platform A Sub-Project 1 Sub-Project 2 Platform B Sub-Project 3 ...

    Read the article

  • Batch renaming 32000 files - splitting into multiple subdirectories

    - by Gareth
    I've got a web server which has files uploaded to it. There is a script which assigns them numeric IDs and stores them in a corresponding subdirectory. I've now got 32000 of these uploads and that's too many for the server to handle in one directory. The script I'm using does have a way to "namespace" uploads so that ID 12345 - instead of sitting in /files/12345 - would sit in /files/namespaced/000/012/345. The code can deal with this just fine, but I now have 32000 subdirectories in the wrong naming style. What's the easiest way to go through my existing files and put them in the right place?

    Read the article

  • How to set up Apache 2 to serve only subdirectories

    - by Lynden Shields
    I have 3 sites which need to be hosted on a web server (apache2 from repo running on Ubuntu 12.04). They are each in their own subdirectory within /var/www/ I would like apache to serve files from the relevant directories only if the directory name is given in the URL, but not serve the /var/www/ directory itself. E.g: http://1.2.3.4/site1/ should work and serve the index from /var/www/site1/index.html, but http://1.2.3.4/ should not serve anything. Currently, I can't get the url to point to the directory. Either I can get http://1.2.3.4/ to serve everything within /var/www/ (including /var/www/site2/secretstuff/), or I can get the root http://1.2.3.4/ to serve one of the subdirectories (/var/www/site1/). This is unacceptable site 1 needs Indexes enabled but the others must not. I just want to make site1's config only respond to requests of the form http://1.2.3.4/site1/* and not handle requests of the form http://1.2.3.4/ I do not have a domain name set up so I can't use subdomains.

    Read the article

  • Nginx + Wordpress Multisite 3.4.2 + subdirectories + static pages and permalinks

    - by UrkoM
    I am trying to setup Wordpress Multisite, using subdirectories, with Nginx, php5-fpm, APC, and Batcache. As many other people, I am getting stuck in the rewrite rules for permalinks. I have followed these two guides, which seem to be as official as you can get: http://evansolomon.me/notes/faster-wordpress-multisite-nginx-batcache/ http://codex.wordpress.org/Nginx#WordPress_Multisite_Subdirectory_rules It is partially working: http://blog.ssis.edu.vn works. http://blog.ssis.edu.vn/umasse/ works. But other permalinks, like these two to a post or to a static page, don't work: http://blog.ssis.edu.vn/umasse/2008/12/12/hello-world-2/ http://blog.ssis.edu.vn/umasse/sample-page/ They either take you to a 404 error, or to some other blog! Here is my configuration: server { listen 80 default_server; server_name blog.ssis.edu.vn; root /var/www; access_log /var/log/nginx/blog-access.log; error_log /var/log/nginx/blog-error.log; location / { index index.php; try_files $uri $uri/ /index.php?$args; } # Add trailing slash to */wp-admin requests. rewrite /wp-admin$ $scheme://$host$uri/ permanent; # Add trailing slash to */username requests rewrite ^/[_0-9a-zA-Z-]+$ $scheme://$host$uri/ permanent; # Directives to send expires headers and turn off 404 error logging. location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires 24h; log_not_found off; } # this prevents hidden files (beginning with a period) from being served location ~ /\. { access_log off; log_not_found off; deny all; } # Pass uploaded files to wp-includes/ms-files.php. rewrite /files/$ /index.php last; if ($uri !~ wp-content/plugins) { rewrite /files/(.+)$ /wp-includes/ms-files.php?file=$1 last; } # Rewrite multisite '.../wp-.*' and '.../*.php'. if (!-e $request_filename) { rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last; rewrite ^/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$ $1 last; rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last; } location ~ \.php$ { # Forbid PHP on upload dirs if ($uri ~ "uploads") { return 403; } client_max_body_size 25M; try_files $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } } Any ideas are welcome! Have I done something wrong? I have disabled Batcache to see if it makes any difference, but still no go.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >