WordPress.org

Support

.htaccess

Viewing 15 replies - 1 through 15 (of 68 total)
  • I admit I am very much a n00bie when it comes to a lot of this stuff — i’m a Moveable Type convert.
    I’m trying to change my URI’s to the “neat and tidy” permalink structure and that’s failing with a big fat 404.
    I’ve been looking around for help with this and everything points to the .htaccess file but the thing is — I don’t have an HTAccess file. I don’t know how to set one up for WP and what not… Like I said, I’m a noobie with this!
    Help greatly appreciated…

    What’s your URI structure?

    /archives/%year%/%monthnum%/%day%/%postname%/
    mind you, like i said, I know nothing about setting up an .htaccess file (or making it writeable in wordpress, etc).

    Ah, so you haven’t set up your .htaccess file?

    If you go into ‘templates’ under the admin page is there a link to your .htaccess file?

    No set up Acccess file…
    If I go to Templates and click on the link to .htaccess (for rewrite rules) I get this dandy little message:
    Editing .htaccess
    Oops, no such file exists! Double check the name and try again, merci.
    —–
    SO that’s not working…

    Okay, this is because you do not have a .htaccess file, that’s fine…
    Here’s what you need to do:
    1. Log on to your site via FTP
    2. Open up your favorite text editor and add the rules it asks you to add to your .htaccess file
    3. Make sure that at the very top of your .htaccess file the first line is: RewriteEngine On
    4. Save your file in plain text format
    5. Upload the file to your server in the same directory that you installed WordPress to. Then rename the file to exclude all extensions and be sure to add the period at the beginning of your file. Result should be: .htaccess
    Now you’re set. Let me know if you have any problems.

    Can you post the contents of your final .htaccess file? .. and be sure to check the template page to see if it shows up in the proper place.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^archives/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp/wp-feed.php?category_name=$1&feed=$2 [QSA]
    RewriteRule ^archives/category/?(.*) /index.php?category_name=$1 [QSA]
    RewriteRule ^archives/author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp/wp-feed.php?author_name=$1&feed=$2 [QSA]
    RewriteRule ^archives/author/?(.*) /index.php?author_name=$1 [QSA]
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?/?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/(feed|rdf|rss|rss2|atom)/?$ /wp/wp-feed.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA]
    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/trackback/?$ /wp/wp-trackback.php?year=$1&monthnum=$2&day=$3&name=$4 [QSA]
    RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /wp/wp-feed.php?feed=$1 [QSA]
    RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /wp/wp-feed.php?feed=$1&withcomments=1 [QSA]

    Ah, and one more thing, set the permission of your .htaccess file to 666…

    Also, let me know if your .htaccess file is showing up in the templates page. If it is not, that means it’s in the wrong directory.

    Hmm, dunno. The rewrite rules should do the trick.. Can you think of any other reason why it wouldn’t be working? Anything else you’ve changed regarding WP?

    Nothing else has changed. I imported originall a few days ago from MT…. I’ve made several entries since that import. I have the MT redirect PHP script installed. It hasn’t been workign because of the permalink structure being blank. so today (just a little whiel ago) I changed the structure to the default structure that is given in the permalink page ont eh Administration page.

    Hmm… I really don’t know why it wouldn’t be working. I followed the same steps I gave you to set up my permalinks ( check out my site ) and it works fine.

    Could it be my host? I’m on Dreamhost which has basically everything a guy could want. I didn’t have php-cgi working…
    I should look into mod-rewrite if I need it installed

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