1

I'm trying to move a client's site to a new server.

mod_rewrite is definitely enabled.

Test address is http://176.32.230.45/hubbwayhire.co.uk/ which loads fine.

http://176.32.230.45/hubbwayhire.co.uk/about.php also loads fine.

I have this in htaccess

RewriteEngine On
RewriteBase /
RewriteRule ^about about.php
RewriteCond %{REQUEST_FILENAME} !-f  
RewriteCond %{REQUEST_FILENAME} !-d  

But loading the following: http://176.32.230.45/hubbwayhire.co.uk/about gives me the following:

Forbidden
You don't have permission to access /about.php on this server.

Permissions are also completely fine.

Server owners will not help us at all. Any help appreciated?

Callombert
  • 147
  • 4
  • 2
    With the URL you're using the `RewriteBase /` is incorrect. That should `RewriteBase /hubbwayhire.co.uk/` or can be omitted I think. – HBruijn Oct 10 '16 at 15:01
  • You get the same error when you try to access `http://176.32.230.45/about.php` - which is what your code is doing (with the `RewriteBase` that HBruijn mentions above). The `RewriteBase` directive can be omitted if this `.htaccess` is in the `/hubbwayhire.co.uk` subdirectory. Also, your .htaccess would seem to be incomplete. – MrWhite Oct 10 '16 at 15:09
  • Also you have two `RewriteCond` directives with no `RewriteRule` after, so they do nothing, unless you missed a `RewriteRule`. When you get a 403, look in the error log and add what is in there to your question that relates to the 403. – Unbeliever Oct 10 '16 at 15:10
  • @HBruijn Thank you so much the RewriteBase fixed it. Can't believe I've spent this much time on it and couldn't figure this out. I tried to remove the rewritebase but it didn't work either. – Callombert Oct 10 '16 at 15:20

0 Answers0