I have a folder with two physical directories:
myfolder
foo
bar
And I map a virtual directory into myfolder/baz.
When I access the directory listing for myfolder, only foo and bar are shown. I know this is by design, but is it possible at all to allow virtual directories be listed among physical ones?
Figured out how to accomplish this.
You have to create an empty folder with the same name (baz in my example). It will make that folder appear among other physical folders in the directory listing and will display contents from virtual directory mapped to the same folder.
Hopefully this will help someone else.
Related
I am trying to create folders in Gitlab through the web interface. I was able to see some repositories with folders. I could not find any option to create such folders. How are such folders created?
If you specified a path for a file, Gitlab will create directories if they not exists.
For example, if you add a file named dir1/dir2/test.md, Gitlab create two nested directories with test.md inside.
So I am taking a web development class and in most of my classes they’ve been teaching us to keep our files separate. For instance, I have a public folder and an includes folder. In my includes folder I have my database information and functions. So here is where my issue is: I am trying to post a site in godaddy and when I try to set it up their tech support told me I should place all my files in the public folder. Is that really true? I thought I would need to place my includes(private) folder in another place; if so, where should I be storing it?
GoDaddy may not be the best source of advice. When you SSH into your account (or use the File Manager) you should see your login dir which will IIRC have a www or html dir (and sometimes both, one symlinked to the other). Those are your public webroot/DOCROOT locations. Make a dirtree of your own as a sibling to the www/html dir and use that for your include tree.
When you need the absolute path to your directory tree in order to know where to grab your includes, you can get that from the GoDaddy admin interface - https://support.godaddy.com/help/article/58/finding-your-hosting-accounts-absolute-path
I am looking to use the below asp.net 4.0 web application structure but not quite sure how to achieve my result as explained below. What configuration will be needed to handle path issues for referencing both. For example ~/css/style.css needs to dig into the WEBSITE. I know I will have to create a helper for RESOURCES -- WebResourcePath("images/image1.jpg") returns full path if that works in a separate virtual directory?
Default Web Site
>SAR-GROUPS
SARGROUPS_WEBSITE
SARGROUPS_RESOURCES
All website files like aspx, js, css, etc. normal web files go in the WEBSITE folder. The RESOURCES folder will contain other files like pdfs, xml, txt, images, and files . These files will not need to be uploaded or updated during deployments and can remain untouched. When I deploy the WEBSITE I only need to delete the WEBSITE folder and copy the new precompiled folder in SAR-GROUPS again. I have to deploy like this as it is automated deployment from scrips that run so this is an xcopy deployment.
Does anyone have good practices or a working setup to achieve this. I am not looking at alternate methods unless it cannot be done or the other way is much better for auto builds.
Thanks
If the files in the SARGROUPS_WEBSITE directory need to reference resources in the SARGROUPS_RESOURCES directory then why not just make the SARGROUPS_RESOURCES virtual directory inside the SARGROUPS_WEBSITE directory? This way you can point the SARGROUPS_RESOURCES virtual directory at a physical location on the disk and delete the contents of SARGROUPS_WEBSITE without touching the resources.
So structure would be
Default Web Site
>SAR-GROUPS
SARGROUPS_WEBSITE
SARGROUPS_RESOURCES
But the physical structure could be anything
You can then reference them like
~/SARGROUPS_RESOURCES/css/style.css
*untested
EDIT
You've totally not understood my answer and/or virtual folders.
Physical structure example:
D:\Inetpub\WEBSITE
D:\Inetpub\RESOURCES
IIS structure:
IIS Root -> Site (that is a website and points to D:\Inetpub\WEBSITE)
IIS Root -> Site > Resources (that is a virtual directory and points to D:\Inetpub\RESOURCES)
I wish to offer my website in different languages and still keep everything on the same domain. Subdomains is not an option, unfortunately. I want to be able to tell people to go to a subfolder to choose the language of their wish.
For example:
Go to http://www.example.com/es/ to use the Spanish version or go to http://www.example.com/sv/ to use the Swedish version.
I want to build the website from one place, so all the code is located in the base folder. All the folders I create in the website (like "es", "sv" and so on) just needs to reference to the base folder. How do I do that in ASP Classic (VB)?
My folder structure looks something like this:
/base/
default.asp
join.asp
...
/es/
-- Get code from the base folder --
/sv/
-- Get code from the base folder --
...
I have searched throughout Stackoverflow but I can't seem to find the answer to this one. I hope someone can help me solve this!
You can add a virtual folder in IIS that points to your /base/ folder. Create one folder for every language you want to support.
Virtual folders are like Windows shortcuts, just a link to a different location on the harddisk (or even on the network). This way you can add folders for every language, and they all point to the /base/ folder.
If your virtual folder has a global.asa file, it becomes an application in IIS and you can overrule the default global.asa in it. However, in your case just adding virtual folders would do the trick.
Hope this helps,
Erik
Say I have a directory structure like so:
/public
/public/company
/public/globals
/public/globals/images
/public/jobs
/public/jobs/it
... etc.
What I would like to do is to be able to configure an IIS Site to load from /public/company when visiting the domain root. I know I can change the site to /public/company, but if I do that, I can't seem to reference the /public/globals directory to obtain images, videos, and other items used across the site.
The other problem is accessing /public/jobs with a domain/jobs url... although I suppose virtual directories can help there, but then I would assume that I would still run into problems trying to access /public/globals for images and other things.
Any ideas? Am I not doing this right? I'm used to using Apache... obviously a very different environment...
Create a Default.aspx page in the root, and on that page, run this:
Response.Redirect("~/public/company/destination.aspx");
I seemed to have found the answer. I set the default path of the Site to /public/company, and created a Virtual Directory called "globals" that points to /public/globals. Now I can reference images via the Virtual Directory like so:
<img src="/globals/images/awesome.png" />
I suppose I just need to create virtual directories for everything under the sun for the rest of the site then.