Problem with htaccess

Status
Not open for further replies.

xandor

Active Member
209
2011
21
0
Problem with htaccess [Resolved]

All of a sudden my website started showing "403 Forbidden" error messages.
I tried to find the reason for this and read that deleting htaccess could solve the problem, tried with renaming it and my index page of my website started working again. Although all my other pages showed 404 not found.
The new htaccess file that was generated was empty.
I tried to paste the content of the old file into the empty file again, to revert the change so got 403 Forbidden again.

What should I do to solve this?
Content of htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
 
Last edited:
9 comments
Think it doesnt matter if you know the site (since it just shows this message):
Forbidden

You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


<removed website name>


Why would read and executions rights change all of a sudden?

Not sure which files to check, index.php got read and write permissions, not execute.

Dont know much about what permissions they need, if it is execute to show them in browser. And dunno how to change the permissions for all the needed files. If that is the case.
 
Last edited:
[Sat Jan 14 23:33:14 2012] [error] [client] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden

That error appeared around 300 times in the last 10 min in error log.

Btw, the exact permission files got is 0644
 
for shits and giggles try

Code:
Options +FollowSymLinks
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

also you on shared hosting or vps/dedi?
and did you change host or same host as when it was working?
 
Think you just saved my website with that "Options +FollowSymLinks" line. It started working again right after I changed it.

THANK YOU!!

It is shared hosting and it is same host. I didnt change anything, I worked earlier today and then when I checked back it stopped working.
Only thing I did today was writing a post and saving the draft.
 
glad to help, and most likely (since its shared hosting) the host did something while updating something on server...but all is well now :)
 
Think you just saved my website with that "Options +FollowSymLinks" line. It started working again right after I changed it.

THANK YOU!!

It is shared hosting and it is same host. I didnt change anything, I worked earlier today and then when I checked back it stopped working.
Only thing I did today was writing a post and saving the draft.

It should work without that in the .htaccess file.

In addition to checking the r/w permissions on the files, check the user and group ownership of your index.(php|html|html etc) file.

It could be, and not sure how, that the permissions have changed.
 
Status
Not open for further replies.
Back
Top