DigitalBerg
  • HOME
  • WINDOWS VPS
  • VIRTUAL SERVER
    • Virtuozzo VPS
    • OpenStack VPS
    • Amazon Lightsail VPS
    • VMware VPS
  • DEDICATED SERVER
    • INSTAND DEDICATED SERVERS
    • HOSTING DEDICATED SERVERS
    • DEDICATED ENTERPRISE SERVERS
    • INFRA. DEDICATED SERVERS
    • DEDICATED GAME SERVERS
  • MORE
    • SSL SHOP
    • FREE SSD WEBHOSTING
  • LOGIN
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu

We talking about Cloud

Web Hosting & Cloud Services
Celebrate the power and freedom of Open Source
with Open Source Cloud Servers starting at only £10/mo £5/mo.

.htaccess Guidance and How to

The .htaccess file is a special Apache file that adjusts the way your website behaves. You can edit the existing .htaccess file on your site, or you can create a new text file in any directory and name it .htaccess.

How can I secure my .htaccess file?

The .htaccess file is already protected and forbidden to browsers. To be sure, double check that the file is named “.htaccess” and not “htaccess” or “htaccess.txt”. The file must start with a dot.

Can I delete my .htaccess file permanently?

You can delete the .htaccess file, but it will reappear immediately as a blank file. DigitalBerg has default directives which will always be in place, unless you create your own directives to overrule ours.

.htaccess Example

Even if you erase and remove the .htaccess file, HostGator uses this code as a default.

DirectoryIndex index.html index.shtml index.php default.html home.html

You can override those defaults by creating your own rules.

DirectoryIndex home.html page1.php index.txt

Additional .htaccess Coding Resources

The following articles may open external websites and are for reference only. Please note that HostGator cannot offer direct support for the information provided below.

  • Javascriptkit.com
  • Apache.org
  • Modrewrite.com
  • mod_rewrite Lessons
  • mod_rewrite Examples

For examples of common .htaccess codes, please see the following article:

  • Apache mod_rewrite and Examples
Get in Touch

Let me know if you got an interesting project and want to work together!

digitalberg.com

DigitalBerg fuels apps, websites, emails, and much more for numerous clients globally.

Virtual servers to dedicated servers at affordable prices that any hostinger student can afford.

Services

  • Web Hosting
  • Virtual Server
  • Instant Servers
  • Dedicated Servers
  • Enterprise Servers
  • Infrastructure Servers
  • Gaming Servers
  • SSL Shop

SUPPORT

  • Contact Us
  • Wiki
  • FAQ
  • Blogs

Company

  • About Us
  • Partners
  • Privacy Policy
  • Term of Service
  • Acceptable Use Policy
  • Green Hosting
  • Data center

CLIENT AREA

  • Registration
  • Client Area
  • Server Status
  • Support

OTHER SERVICES

  • Domain Registration
  • Transfer Domain
  • Add ons / Management
  • SSL Certificates
  • Server Monitoring
  • Server hardware
DigitalBerg review
DigitalBerg review
© Copyright - DigitalBerg | From January 1st 2015, in accordance with the amended Directive 2006/112/EC, prices inclusive of VAT may vary depending on the country of residence of the customer.
  • Link to Facebook
  • Link to X
  • Link to LinkedIn
Link to: How to Edit .htaccess File Link to: How to Edit .htaccess File How to Edit .htaccess File Link to: How to enable mod_rewrite and mod_speling Link to: How to enable mod_rewrite and mod_speling How to enable mod_rewrite and mod_speling
Scroll to top Scroll to top Scroll to top