WordPress.org

Ready to get started?Download WordPress

Forums

Request: Have WP actually create cruft free archiv (7 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    Hello,
    I need WP to actually create cruft free URLs, not just point to them in .htaccess. My host is using PHPSuexec to make php more secure, but it also frigs up mod_rewrite. I've asked around and it looks like the only way to get clean URLs is to have clean directories.

  2. NthMike
    Member
    Posted 10 years ago #

    The problem there is that WP doesn't actually have archive directories, since everything is dynamic and runs through index.php.

  3. OperaManiac
    Member
    Posted 10 years ago #

    that is a good thing actually. i dont want zillions of pages to worry abt to mantain my blog. i left blogger for the same thing. it freaked out one fine day...

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    I know, I want WP to create the directories.

  5. Alex King
    Member
    Posted 10 years ago #

    You may want to look into systems that already have this functionality, there are several.

  6. eadz
    Member
    Posted 10 years ago #

    You don't need real directories. If mod rewrite doesn't work, does this : ?
    Create a file called 'archives' and put in it
    <?
    echo $_SERVER['PATH_INFO'];
    ?>
    in .htaccess put :
    <Files archives>
    ForceType application/x-httpd-php
    </Files>
    Now, when you go http://www.youryoursite.com/archives/2003/04/21 you should see something like /2003/04/21
    Basicly, you can then include index.php into that file after setting some paramaters. ( this is how bblog does it, and how i've always done it rather than mod rewrite. I'm not sure which is more compatible in terms of hosts supporting it .. the Files directive or mod rewrite.

  7. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    You might also want to look into a funky caching system. Have a custom 404 page that passes request to index.php and then saves the output to the filesystem. Then add
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    to the rewrite rules. You'll also want to have the caches expire somehow, I would suggest using the file mtime (and comparing that with last comment or last post modified time) or simply have a cron clean the files out every now and then.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.