1

my problem is that I moved my entire website to a subfolder of the public-html one. Tried to rewrite the URLS to automatically add the subfolder via the .htaccess but didn't succeed this is the code :

ErrorDocument 401 "Unauthorized"
ErrorDocument 403 "Forbidden"
RewriteEngine On
RewriteBase /
DirectoryIndex index.php index.cgi index.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ anb/$1 [L,QSA]

Thanks in advance

Mark Prim
  • 41
  • 4
  • Possible duplicate of [.htaccess URL Rewrite to Subdirectory](http://stackoverflow.com/questions/864507/htaccess-url-rewrite-to-subdirectory) – Gray Feb 06 '17 at 19:57

1 Answers1

0

I got it to work by deleting the line

RewriteBase / 

Apparently the RewriteBase doesn't work well when the .htaccess is placed in the root directory A.K.A [public_html]

Mark Prim
  • 41
  • 4