Mobile app version of vmapp.org
Login or Join
Shakeerah822

: Extend depth of .htaccess to all subfolders and their children I need to be able to use .htaccess in all subfolders for full depth. E.g. I have .htaccess in public_html folder: public_html.htaccess

@Shakeerah822

Posted in: #Apache #Htaccess #Php

I need to be able to use .htaccess in all subfolders for full depth. E.g. I have .htaccess in public_html folder:

public_html.htaccess


How I make it to work for the folder small as well?

public_htmlhomeimagesredthumbssmall


It only enforces up to home directory not more.

ErrorDocument 403 google.com Order Deny,Allow
Deny from all
Allow from 11.22.33.44



Options +FollowSymlinks
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ %1/ [R=301,L]

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Shakeerah822

2 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

I was having this trouble as well.

And it turned out the solution is quite simple:

In your "main" .htaccess under /your_root/, add the following lines:

RewriteBase /your_root/

RewriteOptions InheritDown

10% popularity Vote Up Vote Down


 

@Holmes151

Are you using Apache? Subdirectories are supposed to inherit .htaccess by default under Apache.

Check your /etc/apache2/httpd.conf file. It could be that you have a <Directory> directive that is keeping your .htaccess from being applied to subdirectories, like it should by default.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme