0

In my htaccess I think I must wrong path of RewriteBase.

My server has this structure:

/public_html/example

and in this example there are all my site so to go on my site I do this url:

http://home.com/example

But I get 500 internal server because I think I wrong my RewriteBase in my htacess:

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /example/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /example/index.php [L]
</IfModule>


AuthBasicProvider file

AuthUserFile /public_html/festivalmusicasullacqua/.htpasswd.txt
AuthName "Authorization Form Title"
AuthType Basic

#Allow any valid user
require valid-user

#Allow only one user with specified username
require user festival

Anyone can help me to correct the code?

Poppy
  • 27
  • 7
  • What's in the apache and php error logs? – Matt May 17 '17 at 16:20
  • I'm in a FTP in a customer client, I access only with ftp, where I find this php error Logs? – Poppy May 17 '17 at 16:25
  • It's defined in the php.ini or in the script itself. It's going to be difficult without ssh access. – Matt May 17 '17 at 16:26
  • Yes i Know but I can use only FTP. I think the error is RewriteBase variable! – Poppy May 17 '17 at 16:29
  • "I must wrong path of RewriteBase" - FWIW, your `RewriteBase` directive isn't actually doing anything in the code you've posted. (So, it's certainly not the cause of your error.) – MrWhite May 17 '17 at 17:42

1 Answers1

1

You have two parts in your .htaccess file: a rewrite part, and an auth part. I think that the error is not in the rewrite part, but in the auth part (you can try commenting it to confirm this hypothesis).

If I am right and the error is in the auth part, the reason is probably that FTP chroots you. Then you only see a relative filesystem path.

Thus I doubt that the AuthUserFile line has a correct path: you must specify an absolute path.

shaunhusain
  • 19,630
  • 4
  • 38
  • 51
  • Thanks Pierre I correct with your suggest and now it all works. The error is that the path is /home/home/public_html/example – Poppy May 18 '17 at 07:52