I presume when you are typing .ftaccess, the file you have on the server is actually named .htaccess?
Yes it is. I got that part correct.
Ok, let me come at this another way. I have been reading as much as I can on the boards and tutorials. I have used chmod to change attributes of the .htaccess file to 777. I am getting 403 Forbidden errors now. I don’t what’s going on. Is my .htaccess file in the correct place? I have uploaded it into the main director, below the folders for WP-Admin, WP-Content, etc.
My .htaccess is 766 and that works for me and it is at the same level as WP-Admin, WP-Content, etc.
OK, my .htaccess file is in the right place. It has a file size of 0. I changed the attributes to 766. Just to make sure that everything was reset, I did a ctrl+f5 hard refresh, and went to the dashboard to attempt resetting my permalinks. I hit the “update permaling structure” button, and now I get a 403 forbidden error on any page that I try to access. WTF?
Does the 403 error go away when you delete the .htaccess file? If not then the 403 is being caused by something else.
Yes it does, Tom. But It comes back when the .htacess file is reinserted and is written to. So there is some connection.
What are you setting your permalink structure to?
.htaccess file is a bit dodgy.
Mine was set to 660, which is all enough, and it should be writable by wordpress.
Then suddenly, it became not. I couldn’t update .htaccess file through wordpress nor cpanel. After save, it just went back to the original in cpanel, and wordpress says it’s not writable.
So I deleted that file, then created another one. Same 660. This time everything works again.
It seems that my web host, myhosting.com – who feature a nice WordPress logo on their main page, don’t allow me to access the .htacess file for security reasons. I have to setup a seperate password file apparently. That would have been nice to know before spending days on end trying everything else. I am seeking clarification and will post the happy conclusion.
Warning: Lengthy Post
Well that went nowhere. Here was the first reply from myhosting.com:
<For our Linux accounts we support the use of .htaccess files but for
security reasons we do limit its use and only allow the following
functionality. Below are some of the most common reasons and methods of
using the .htaccess file.
Password protection
Password Protection allows you to have a folder or specific file
password protected, this means when someone tries to browse to that
folder or file a box will come up requesting they fill in a username and
password.
To achieve this password protection you will be actually using two
files, one is the .htaccess file and the other is the .htpassword. Lets
say I want to create a user “bob” with the password “smith” and protect
the following folder “x.mydomain.com/secret” Below is what I would put
in the files:
FILE: .htaccess
AuthUserFile
/var/www/domains/x.mydomain.com/docs/secret/.htpasswd
AuthType Basic
AuthName ‘Secured Directory’
require valid-user
FILE: .htpassword
bob:Wr9K63jF9u5S2
You can make these files using any text editor your choose (notepad for
example) and then upload the to the /docs/secret folder on your Linux
account. If your looking at this you’re likely thinking to yourself:
where did you get the “Wr9K63jF9u5S2” from. Well that is the Linux
encrypted version of the word “secret”. To generate this encrypted
version you can just visit the link below and put in the username and
password you want and it will generate the line you need to input.
http://cmpt165.cs.sfu.ca/docs/htpasswd-create>
So I asked for clarification. Where would I add this text in the file, etc. Here was the lengthy reply:
<You would have to contact WordPress to find out what folder they want
what file in. >
If anyone can help me sort out this mess I would be greatly appreciative.
Our reply:
WordPress would the like the presented mod_rewrite code to be placed in a .htaccess file in the same directory (folder) as the WordPress index.php file.
My .htaccess is in the same directory as the WordPress index.php file. Which presented mod-rewrite code do you mean? Sorry if I am slow on the uptake.
Upon setting permalinks, WordPress should either create or update the .htaccess file, or display a set of mod_rewrite rules to place into the .htaccess file.
Macmanx – My empty .htaccess file was updated when I set the permalinks. The problem is that as a result of that, ALL pages from the dashboard, including the main page http://x.babygotbooks.com are 403 forbidden. It appears that my server is locking me out for updating the .htaccess file.
I have been trading e-mail with my web hosting support all morning, trying to get to the bottom of this. In short, updating my .htaccess file causes all pages to return Error 403 Forbidden Screens. I was told that certain .htaccess functions are not supported. When asked which functions, I was provided the following list. I’m not savvy enough to know what they mean. Can any of these be the cause of my problems?
The following PHP functions cannot be used:
fsockopen
passthru
proc_close
proc_get_status
proc_nice
proc_open
proc_terminate
pclose
set_ini
popen
system
shell_exec
exec
* PHP Value is not allowed in .htaccess files