Trying to create .htaccess file using ftp doesn't work - apache

I want to create a .htaccess file in a specific directory. I'm using Notepad++ and their plug-in for FTP (NppFTP). I'm able to create any other files and see them in the folder but when I try to create a .htaccess I don't see that file in the directory. I get no errors, it is like nothing happened.
I tried to create this file using an FTP program and it showed the file and right away it disappeared. My guess it is because this is a special file used by the system and prefixed by a (.)
What is a way to edit that file?

This is probably because your ".htaccess" file is a hidden file and your system is set up to no display hidden files.
Have a look in your Notepad++ settings if there's an option to make hidden files visible/unhide.
In addition to that check the windows folder options for that option!

switch on showing hidden files in your ftp client

Related

How to Create .cmake File

I was working on a project which requires me to add a user.cmake file in the root directory. Can anyone help me out hot to create the .cmake file...
Link to Project Directory
According to the link you provided user.cmake just needs to point where so-called eego sdk is located in your file system:
set(EEGO_SDK_ZIP /path/to/download/eego-sdk-1.3.19.40453.zip)
There is nothing fancy actually here, just make a plain text file, put this one line (don't forget to replace the EEGO_SDK_ZIP variable content) and save it with the name user.cmake

How to create new folders on my domain name

As you can tell from the title, I don't know what words that I should use to describe what I want to do.
I just want to be able to change my website's files from:
www.example.com/bark.php
and www.example.com/leaves.php
to
www.example.com/tree/bark.php
www.example.com/tree/leaves.php
While having a www.example/tree.php page as well.
So, I'm working with PHP and am building this with Sublime text editor. Is this an .htaccess job?
Thanks in advance :)
You don't need .htaccess or any programming language.
Simply create the folder, put your files in it, and upload them back to the server. You'll also want to delete the old files on the server as well.
Alternatively, you can rename the files on the server itself. You can either right-click on the target file, and click 'Move'.
You can also drag the files directly by clicking-and-dragging:
The file www.example.com/tree.php is just another file, stored in the ROOT folder. You are allowed to have a folder and a file with the same name.
www.example.com/tree will point to the tree folder, and attempt to access the index at www.example.com/tree/index.html or www.example.com/tree/index.php.
The file www.example.com/tree.php will not be loaded when viewing www.example.com/tree without .htaccess configuration.
Hope this helps! :)

automatically place downloaded files in folder bsed on downloads extension suffix

I’m making a simple web browser for work eeh, what I’d like to know is if its possible to save a file of a particular extension to a particular file.
I currently use google chrome when downloading a file it places this (regardless of extension) in a downloads folder without asking where I ant to download this too.
I want to achieve the same except that downloads with the extension .dwg are placed automatically in a folder named DWG DOWNLOADS…
How to achieve this in vb.net?
In any browser you have a config section.
In Firefox you have browser.download.useDownloadDir;true and browser.download.folderList;1
you can add your own config to allow different saved folder paths and dynamically modify them depending on the extension of the file you uploaded.
See a complete list of the web browser config with about:config in address bar.
Not real sure what you are asking, but if you are actually making a web browser just check the extension of the file you are requesting to download. If the extension is ".dwg" then save the file to the folder you want.
If you are wanting to automatically move Google Chrome downloads to a different directory, you can use a FileSystemWatcher to monitor for new files in Chrome's download directory and move them to another folder based on each file's extension.

Intellij Idea problem with text file impossible to read

I have a problem using Intellij Idea.
I am absolutely unable to load text file as InputStream - it doesnt matter where do I put the file (main/java, main/resources...) it just can't find the file - in Eclipse everything works just fine.
I tried setings->compiler->resource patterns and added ?*.txt but that doesn't seem to work either.
Any help is appreciated.
If you load it as a File, make sure that Working Directory is properly set in IDEA Run/Debug Configuration, since it's the default directory where Java will look for a file when you try to access it like new File("file.txt"). Working directory should be set to the directory of your project containing .txt files.
If you load files as a classpath resource, then they should reside somewhere under Source root and will be copied to the classpath according to Settings | Compiler | Resource Patterns.
If you can't get it working, upload your project somewhere including IDEA project files so that we can point to your mistake.
Look at the image, notice that the txt files are in the project root, and not the source folders (in blue).
If you open the Project Structure dialog, and click on Modules and select your module - are the correct folders marked as Source Folders on the sources tab?
Link for how to get to Project Structure dialog
Also, if you print out the absolute path of that file you are trying to read, is that anywhere near where you expect it to be?
An easy way to figure out the same would be to try creating a file in the same fashion and see where it gets created in your project. You can put your input file at the same location and it should work just fine (if it doesn't, you should check your resource pattern which might be causing the file to be not copied over in the build output).
This method actually gives you the working directory of your intellij settings which is pointed out in the accepted answer. Just sharing as I had similar trouble and I figured out this way. :)

Setting file extension for File Dialog in Objective-C

I was wondering how to set the file extension for a file dialog so that only those files with that extension show up in the folder. I know there is a way to set if files/directories can be seen, and the folder that the file dialog looks in, but haven't come across a way to set the file extension. Any suggestions?
Use the NSOpenPanel/NSSavePanel method setAllowedFileTypes:. OS X thinks in terms of file types, not extensions.