• I’ve looked all over the forum archives and can’t find an answer to this; I apologize if it’s already been posted.
    I have WP installed on a subdirectory (https://mywebsite.com/abc) of my website, and I can’t seem to get the permalink structure to work. Without mod_rewrite rules the permalinks work just fine (index.php?p=2). I’d like to switch the structure to abc/archives/year/month/day/postname, but whenever I use that structure, I get 404 errors. (My webhost permits mod_rewrite.)
    It’s the default permalink structure and I know the URL is correct; am I missing something here?

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’m going to assume you did turn it on right. Did you add the proper code to your .htaccess file as suggested by WP?
    TG

    allusion: look right or not, it’s the only thing that worked. It took me hours of scouring google to find someone who knew the solution. It has something to do with the way ipowerweb has their server set up. I don’t know if it is a FreeBSD thing or an Ipowerweb thing. Something to do with the rewrite engine being outside of the public site root. I don’t know why, but it solved the problem

    Thread Starter emersongeek

    (@emersongeek)

    TechGnome: The code I added to my .htaccess file is as follows.
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9a-z-]+)?/?([0-9]+)?/?$ /wordpress/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
    RewriteRule ^archives/category/?(.*) /wordpress/index.php?category_name=$1 [QSA]

    I tried the changing the RewriteBase as per allusion’s suggestion, but that didn’t work either. I have my .htaccess file in my root directory; should it be in the WordPress directory instead? Or does it matter?
    I appreciate everyone’s help.

    There is no harm in trying different things. You won’t break anything. Try putting it in the wordpress directory.
    I hope you did not use MS Word, or somesuch advanced editor. Use a basic editor like notepad.
    Watch the trailing spaces etc, and you might want to try turning on the SymLinks option. A quick search will lead you to a lot of thread on this forum dealing with the same problem, and you may get more pointers that way.

    emerson geek: try this for your rewrite base: /home/emerso4/public_html/
    put your .htaccess file in the directory your journal is in..
    I think that should work

    Thread Starter emersongeek

    (@emersongeek)

    2fargon: I use BBEdit, but accidentally had a trailing space anyway. I fixed it, though.
    clay: It worked the second time! Thanks! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Permalink structure’ is closed to new replies.