WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks not perma-linking (2 posts)

  1. jbjonesjr
    Member
    Posted 5 years ago #

    So, I have a blog that is all of a sudden not permalinking. The main blog page comes up fine, but all the archived/deep posts don't come up and return a server 404 error.

    My guess is that I have a mod rewrite rule taking over the world somewhere, which is stopping WordPress's internal mod-rewrites from finding the right pages.

    First, the page I'm trying to reach:

    blog.site.com:8080/archives/74

    My apache error log:

    [client IP_ADDR] File does not exist: /var/www/site/blog/archives, referer: http://blog.site.com:8080/

    Now, when I pull up my site (site.com) I do a rewrite to let subdomains (in this case blog) actually be 2nd level folders. I'm using a script found on the web, pretty common. This rewrite message within my apache2 site is below:

    <VirtualHost *:8080>
    	ServerName  site.com
    .........
    <IfModule mod_rewrite.c>
    RewriteEngine on
    
    RewriteMap sub prg:/etc/apache2/sub.pl
    RewriteCond %{HTTP_HOST} ^(?:(.*?)\.)?([0-9a-z_-]+\.[a-z]+):?(8080)?$ [NC]
    RewriteRule ^/(.*)$ /var/www/%2/${sub:%1|www}/$1
    #RewriteRule ^(.*)\.htm$ $1.php [nc]
    </IfModule>
    
    </VirtualHost>

    To aid in the debugging, I have my mod_rewrite set to log, and here is the result of my log file for trying to access the page:

    IP_ADDR - - [26/Nov/2008:10:32:50 --0500] [blog.site.com/sid#b8256d00][rid#b84d1e20/initial] (2) init rewrite engine with requested uri /archives/74
    IP_ADDR - - [26/Nov/2008:10:32:50 --0500] [blog.site.com/sid#b8256d00][rid#b84d1e20/initial] (3) applying pattern '^/(.*)$' to uri '/archives/74'
    IP_ADDR - - [26/Nov/2008:10:32:50 --0500] [blog.site.com/sid#b8256d00][rid#b84d1e20/initial] (2) rewrite '/archives/74' -> '/var/www/site/blog/archives/74'
    IP_ADDR - - [26/Nov/2008:10:32:50 --0500] [blog.site.com/sid#b8256d00][rid#b84d1e20/initial] (2) local path result: /var/www/site/blog/archives/74
    IP_ADDR - - [26/Nov/2008:10:32:50 --0500] [blog.site.com/sid#b8256d00][rid#b84d1e20/initial] (1) go-ahead with /var/www/site/blog/archives/74 [OK]

    So it looks like my url blog.site.com/archives/74 is matching the rewrite pattern in my virtual hosts, getting rewritten to a web address that doesn't exist, and then wordpress either isn't fixing it itself or isn't given a chance to. this problem is new, so i'm not sure what changed in any of my code bases to cause this (I have been moving domains recently..) Any suggestions?

  2. jbjonesjr
    Member
    Posted 5 years ago #

    No ideas? Not even any requests for more info on the errors?

    I thought I had documented this pretty well....

    Any ideas on what could be causing this?

Topic Closed

This topic has been closed to new replies.

About this Topic