.htaccess & Permalinks Problem
Here is my problem:
I’ve created “pages” in my wordpress installation and now would like use cleaner URI’s, ie. point the pages to directories.
My wordpress installation did not create an .htaccess file so I create a blank .htaccess file, upload it, and CHMOD it to 666. I then go into my WP admin and change the permalink structure. When I do this I get a “Forbidden” error on the site.
If someone is familiar with this problem please let me know how I can fix it. Maybe i’m using the wrong permalink structure? Or maybe I have to add some extra code to the .htaccess file that I don’t know about?
I’m hosting the site on mediatemple if that helps diagnose the problem at all.
So, what kind of permalink structure are trying to use? BTW, if it is WP 1.5 you don’t have to add anything to the .htaccess file – WP creates it for you.
Thanks for the reply moshu.
I eventually figured it out. WP wasn’t generating an .htaccess file for some odd reason. The problem was 1 line of code I had to add to the file before my rewrite rules which I wasn’t able to do because everytime I added the .htaccess file my site would error and be “forbidden”
What I did was log into my web control hosting panel and edit the .htaccess that way, added that line of code and it fixed the problem.
BTW, this seems to be a problem on mediatemple hosting accounts. FYI
Can you let us know what you did to fix the problem? I also have a media temple account and am having problems with the htaccess file.
The problem was 1 line of code I had to add to the file before my rewrite rules which I wasn’t able to do because everytime I added the .htaccess file my site would error and be “forbidden”
Nick – what was the extra 1 line of code you added?
I still can’t get permalinks / mod_rewrite / .htaccess to function properly on my site 🙁
Would this addition to the nightly build do anything?
I tried modifying my wp-blog-header.php file with the new lines but it doesn’t fix the problem
ps. how do you download the newest nightly update ?
I found the one line you need. You can add this to the wordpress htaccess file, or I just created a new htaccess file in the root directory of my site:
This will make everything happy and good 🙂
I tried your suggestion a couple of ways but neither worked for me
I tried uploading via FTP a new .htaccess file to my blog directory containing just the one line:
this didn’t work. Tried it with CHMOD setting 666. no luck….
I also tried in the admin panel of Word Press (MANAGE > FILES) adding the line
just before the line
# END WordPress
and then ‘Update File’
Still I get a 404 error when trying to view fancy permalinks?
I’m just wondering if I have the .htaccess file in the right place
My webspace is with oneandone.co.uk
and I run several domains from the one account
In the absolute root of my 1&1 account I have a .htaccess file
I also have another .htaccess file in the directory where my blog is
my blog is located from the root at
which relates to :
I am assuming that the .htaccess file relating to Word Press should be in
rather than in
Would the reason for my errors and problems be because of two .htaccess files?
I am quite literally tearing my hair out with this problem
I can get my blog working with the normal permalinks, but I definitely want fancy permalinks (so I can get index properly on search engines)
I had the same problem — I found the answer in the WP Codex, which says the .htacess file should go in… “in the directory in which your main index.php file resides. For example, if your WordPress blog is installed at domain.com/wordpress/, put the .htaccess file at domain.com/wordpress/.htaccess”
Copy the contents given for the .htaccess file in the window where you set the permalinks, paste it into a text file, save as .htaccess and FTP it to your main WP directory as above.
my index.php file is right in the root of the domain, so it is http://www.backboneamerica.net/index.php.
When I put the .htaccess in that directory, stops all files from being seen.
I tried again… ARGH!!!!
I created an empty .htaccess file & uploaded it and chmod to 666
I changed my permalink structure and click “update permlink structure”
Got the message: Permalink structure updated.
I tried using other links in admin and got FORBIDDEN – no access to the pages.
I tried viewing the site and got my Fedora Core Test Page.
I remove the .htaccess file and my pages come back.
HOWEVER… none of the links on my page work (go figure!) BUT the link structure is correct! (/%category%/%author%/%year%/%monthnum%/%day%/%postname%/)
it’s just that the link can’t be found.
The requested URL /backbone-america/john-andrews/2005/04/18/jan-31-05-ship-him-to-tehran-tech/ was not found on this server.
And I noticed that the http://www.backboneamerica.net/ part is not there…
WHAT AM I DOING WRONG! BOOO HOOOO HOOOOOO!
Trying yet again…
I tried adding /index.php/ and that didn’t help either, and I checked on my mod_rewrite is loaded…
It was a combo of info here, info there, info from everywhere. And in the process I’ve learned a lot more that I don’t know (huh?)
Bottom line is that I had to set the FollowSymLinks directive to yes in Apache. It didn’t work in the .htaccess file.
Whew! Hope my painful experience will help some other confused soul!
>>Bottom line is that I had to set the FollowSymLinks directive to yes in >>Apache. It didn’t work in the .htaccess file.
Can you explain how you do this in Apache?
I have no knowledge on how to load, edit or do anything in Apache?
If you could explain in laymans terms that would be great 🙂
I’m having trouble with this too and none of the above seems to apply to my situation.
I’m running WP1.5. My WP URI is /domain.com/blog/wordpress while my blog URI is domain.com/blog.
I’m trying to change my permalink structure to /%year%/%monthnum%/%day%/%postname%/ from the Dashboard. When I hit “Update Permalink Structure” I get a message saying my .htaccess isn’t writable and giving me the mod_rewrite rules I need in .htacess. At this point the links on my main page did change, but clicking on them gives a 404.
So, time to modify the .htaccess file manually. But the thing is: I don’t *have* an .htacess file, or at least I can’t find it. So I created one with the mod_rewrite rules provided. I uploaded it to domain.com/blog, chmod it to 666 and my blog goes “500 Internal Server Error”.
I delete it out of domain.com/blog and put it in domain.com/blog/wordpress, chmod to 666. Now the site loads but it’s lost all the formatting — the content is there, but all theme and formatting is gone.
What am I doing wrong?
- The topic ‘.htaccess & Permalinks Problem’ is closed to new replies.