Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Introduction to .htaccess  (Read 2909 times)

0 Members and 1 Guest are viewing this topic.

Geek-9pm

    Topic Starter

    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Introduction to .htaccess
« on: September 28, 2017, 12:47:03 AM »
Do you have your own web site?
Have you ever seen a file named this:
.htaccess
To find a tutorial you can search Google or Yahoo for this:
Introduction to .htaccess

Here are two that look good.
http://codular.com/htaccess-introduction
Quote
.htaccess is one of those things that people often refer to as a dark art, much like reincarnation. However it shouldn't be overly confusing or hard, so here we'll look at the basics of rewrite rules with htaccess as well as the more important 301 redirects.
...and
https://docs.acquia.com/article/introduction-htaccess-rewrite-rules
Quote
The .htaccess file controls a number of ways that a website can be accessed, blocked, and redirected. It does this using a series of one or more rewrite rules. These rewrites are made possible by Apache's mod_rewrite module.
From the above you get  the idea that you can modify it in one directory without making a mess of the rest of the system.
Here is on I needed, I just made a simple Notepad file with this one line:
Options +Indexes
Thanks to BC_Programmer for help with that.
That is all it took. All I wanted was to let  others see what is in a directory without actually having FTP into my web site. Of course, it does present a risk of letting others see my secret photos. But that only affects that one directory that has the new htaccess file. Other directories use the default inside in Apache server control files. So the  .htaccess is an modification  of server rules for that directory only
Search for a tutorial and find one that makes the subject as easy or hard as you like. Or do like I do, just come here and ask and somebody will tell you what you need. Works for me.  :D