Need help with updating .htaccess for wordpress URLs

Discussion in 'WordPress' started by BILZ, Mar 13, 2007.

  1. #1
    I am trying to give me wordpress blog SE friendly URLS. However the admin tells me that i need to update my htaccess. It provides me some code to add to my htacces file.

    After i add the code it still doesnt work. I appreciate any help. Here is the code it tells me to add:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    Code (markup):
    here is the code that is already present in my htaccess file:

    # -FrontPage-
    
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit 
    
    PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName www.custom-website-designs.net
    AuthUserFile /home/customw/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/customw/public_html/_vti_pvt/service.grp
    AddType text/html .shtml .shtm .htm .html
    AddHandler server-parsed .shtml .shtm .htm .html
    ErrorDocument 401 /index.html
    ErrorDocument 404 /index.html
    ErrorDocument 405 /index.html
    ErrorDocument 500 /index.html
    Code (markup):
     
    BILZ, Mar 13, 2007 IP
  2. Will.Spencer

    Will.Spencer NetBuilder

    Messages:
    14,789
    Likes Received:
    1,040
    Best Answers:
    0
    Trophy Points:
    375
    #2
    Here's what I had to put into my .htaccess to enable pretty URL's for WordPress:

    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?category_name=$1&feed=$2 [QSA]
    RewriteRule ^category/?(.*) /index.php?category_name=$1 [QSA]
    RewriteRule ^author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?author_name=$1&feed=$2 [QSA]
    RewriteRule ^author/?(.*) /index.php?author_name=$1 [QSA]
    RewriteRule ^([_0-9a-z-]+).htm([0-9]+)?/?$ /index.php?name=$1&page=$2 [QSA]
    RewriteRule ^([_0-9a-z-]+).htm/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?name=$1&feed=$2 [QSA]
    RewriteRule ^([_0-9a-z-]+).htm/trackback/?$ /wp-trackback.php?name=$1 [QSA]
    RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /wp-feed.php?feed=$1 [QSA]
    RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /wp-feed.php?feed=$1&withcomments=1 [QSA]
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    Code (markup):
    Plus, in the Wordpress admin console, under Options and then under Permalinks, I had to set my customer permalink structure to "/%postname%.html"
     
    Will.Spencer, Mar 14, 2007 IP
  3. BILZ

    BILZ Peon

    Messages:
    1,515
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks ill give that a try.
     
    BILZ, Mar 14, 2007 IP