Sebastjan
Sebastjan

Reputation: 1147

empty HTACCESS drops webpage (403 error)

I know there are a few of (probably) the same questions out there, but I just can't find any working solution.

I've placed the .htaccess file next to my index.php on the server. And even if the .htaccess is empty the site returns error 403 (forbidden access).

What I wanted to do is remove the .php extension.

http://foo.net/web_new/index_1024.php

And even if I put the following into the .htaccess, the website still returns error 403.

<IfModule mod_rewrite.c>
   Options +FollowSymLinks
   RewriteEngine on 
   RewriteCond %{REQUEST_FILENAME} !-d 
   RewriteCond %{REQUEST_FILENAME}\.php -f 
   RewriteRule ^(.*)$ $1.php
</IfModule>

I've found on the web, to enable the mod_rewrite, I should enable it in httpd.conf. But I search the whole server (ftp), but there is no clue.

where phpinfo() finds conf.d file

/etc/php5/conf.d

where is my root

/srv/www/web6/

Any idea, what could i do?

Upvotes: 1

Views: 928

Answers (1)

Alex
Alex

Reputation: 2146

  1. Make sure that .htaccess has 644 permissions
  2. I think you can remove that ifModule... I find it "messy" there...
  3. Your code looks well...

Upvotes: 2

Related Questions