Support » Fixing WordPress » Permanent Link and .htaccess

  • I’ve tried to create a new .htaccess file an put it into the blog directory. I reorganized my permanent links and insert the content wordpress gave me into the .htaccess file… but now I can’t get access to my wordpress anymore.
    “You don’t have permission to access /blog/index.php on this server.”
    what is wrong with my .htaccess file?!

Viewing 15 replies - 1 through 15 (of 19 total)
  • Download your .htaccess, then DELETE it from the server.
    The permalinks code that WP gave you does not and will not cause that error – there must be extra content in there.

    what extra content? what can I do to make it works?

    The WordPress permalinks cannot lock you out of your own blog – that would be daft 🙂
    Paste the .htaccess here ?

    I didn’t had a .htaccess in the root of my blog. I created a new .htaccess file and just filled it with the code WP gave me.

    I can’t help unless I can see both the .htaccess you created, and any other .htaccess files you have, and you say where they are in your webspace.

    so, there is no .htaccess file on my server. and the file I created just contained:
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index.php/archives/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /blog/wp-feed.php?category_name=$1&feed=$2 [QSA]
    RewriteRule ^index.php/archives/category/?(.*) /blog/index.php?category_name=$1 [QSA]
    RewriteRule ^index.php/archives/author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /blog/wp-feed.php?author_name=$1&feed=$2 [QSA]
    RewriteRule ^index.php/archives/author/?(.*) /blog/index.php?author_name=$1 [QSA]
    RewriteRule ^index.php/archives/?([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?/?([0-9]+)?/?$ /blog/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
    RewriteRule ^index.php/archives/?([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/(feed|rdf|rss|rss2|atom)/?$ /blog/wp-feed.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA]
    RewriteRule ^index.php/archives/?([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/trackback/?$ /blog/wp-trackback.php?year=$1&monthnum=$2&day=$3&name=$4 [QSA]
    RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /blog/wp-feed.php?feed=$1 [QSA]
    RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /blog/wp-feed.php?feed=$1&withcomments=1 [QSA]
    I’ve put it in the root of my blog.

    Comparing first lines:
    RewriteRule ^index.php/archives/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /blog/wp-feed.php?category_name=$1&feed=$2 [QSA]
    RewriteRule ^archives/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /T2/wp-feed.php?category_name=$1&feed=$2 [QSA]
    Try taking ‘index.php’ out of each line ?

    I just tried it.. doesn’t work :/

    Does you host have mod_rewrite enabled ?

    how can I find it out?

    Either mail them, or paste this into Notepad
    <?php phpinfo(); ?>
    Save it as ‘phpinfo.php’ Upload it to your webspace, then go to that file in your browser – – and look through the info that is generated.

    under “loaded modules” mod_rewrite is listed.

    What I suggest is that you take the .htaccess out, and give us a link to your site.
    Then when we see it works, you put it back, and we see what happens ?

    okay! the URL to my blog is:
    the .htaccess file is deleted now!

    as you can see, the links for RSS don’t work.. that’s my problem. I thought about deleting my permanent link structure, but are there any disadvantages without a permanent link structure?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Permanent Link and .htaccess’ is closed to new replies.