Title: Archives.
Last modified: August 18, 2016

---

# Archives.

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/)
 * I’ve just followed the instructions here – [http://mtdewvirus.com/wp-hacks/archives.txt](http://mtdewvirus.com/wp-hacks/archives.txt)
   
   yet when I click my archives link, I get this url, but a 404 [http://www.tamba2.org.uk/T2/archives/2004/01/](http://www.tamba2.org.uk/T2/archives/2004/01/)
   I copied the permalinks structure from the page above. The other effect is that
   my page is now displaying every post I’ve made this month. I have a .htaccess
   covering the entire html directory, and it has the following code in it; Options
   FollowSymLinks Rewriteengine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{
   HTTP_REFERER} !^http://www.tamba2.org.uk/.*$ [NC] RewriteCond %{HTTP_REFERER}!
   ^http://tamba2.org.uk/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://tamba2.org.
   uk.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.tamba2.org.uk.*$ [NC] RewriteRule.*.(
   gif|GIF|jpg|JPG)$ – [F] That shouldn’t interfere with the htaccess as detailed
   on mtdewvirus’ page should it ? I’ve gone wrong somewhere …

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33252)
 * podz,
    Did you modifty the rewrite code I have in the instructions to allow for
   your WP installed in a T2 directory? If you haven’t, you’ll need to make the 
   necessary changes. Also, when I try to access your arch.php, I get a parse error
   on line 83 of that file.
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33289)
 * Wow can I be stupid at times …..
    When I entered the permalink structure, and
   clicked Update, it never occurred to me that the code I needed for my site would
   appear below that in the box that is there ….. It works now – so I can fine tune
   in later Thanks !
 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33308)
 * Not stupid…just an oversight! 😉
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33356)
 * Right …….. I’ve another query.
    With everything (I think) in place, when I click‘
   January 2004’, I actually see all the posts, not just the titles alone. Is this
   the way it is meant to be ? I *thought* I would just see post titles. It’s no
   biggie, I’m just wondering. Permalink is set to /archives/%year%/%monthnum%/%
   day%/%postname%/ (Oh, and if you go look, I know I’ve broken the header link 
   to the main page by using just an image – I’m working on it 😉 )
 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33371)
 * podz,
    It doesn’t look like you have the mod_rewrite rules setup. arch.php is
   never being called from what I can see, because you try to access the file directly,
   [http://www.tamba2.org.uk/T2/arch.php](http://www.tamba2.org.uk/T2/arch.php) 
   there is an error. Could you post your rewrite rules somewhere?
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33373)
 * Okay ….
    RewriteEngine On RewriteBase /T2/ RewriteRule ^archives/([0-9]{4})?/?([
   0-9]{1,2})?/?([0-9]{1,2})?/?([0-9a-z-]+)?/?([0-9]+)?/?$ /T2/index.php?year=$1&
   monthnum=$2&day=$3&name=$4&page=$5 [QSA] RewriteRule ^archives/category/?([0-
   9a-z-]+)?/? /T2/index.php?category_name=$1 [QSA] These were generated when I 
   clicked the Update button after entering a permalink of /archives/%year%/%monthnum%/%
   day%/%postname%/ I’ve checked yours again, and they are certainly very different…..
   and I’ve not a clue why 🙂
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33374)
 * These are lines 80 -86 from arch.php
    <?php include(ABSPATH . ‘wp-comments.php’);?
   > </div> <?php } } else { // end foreach, end if any posts ?> Sorry, no posts
   matched your criteria. <?php } ?> </div>
 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33375)
 * The rules are different in the instructions because you need to point some of
   those archives to the arch.php instead of index.php or the file will never be
   opened. If you are still using the rules generated by WP, it won’t work…they 
   need to be modified.
    Try these: RewriteEngine On RewriteBase /T2/ RewriteRule
   ^archives/?([0-9]{4})?/?([0-9]{1,2})?/?$ /T2/arch.php?year=$1&monthnum=$2 [QSA]
   RewriteRule ^archives/category?/?(.*) /T2/arch.php?category_name=$1 [QSA] RewriteRule
   ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9a-z-]+)?/?([0-9]+)?/?
   $ /T2/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA] That code shouldn’t
   even be in arch.php, unless of course you’ve modified it and want to show comments
   and other things. Have you followed the instructions correctly for creating arch.
   php?
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33379)
 * Right….
    arch.php corrected (I’d mistaken one end of a div for the correct one.
   mod_rewrite done and it’s going a bit further … Archives view now gives this :
   Fatal error: Call to undefined function: get_year_link() in /home/—–path—–/html/
   T2/my-hacks.php on line 15
 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33383)
 * Did you paste the function get_year_link into your my-hacks file?
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33385)
 * Many apologies ………I’d missed that.
    Would doing an MT install be suitable penance?
   It works perfectly 🙂 Thank you
 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33386)
 * 🙂

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Archives.’ is closed to new replies.

 * 12 replies
 * 2 participants
 * Last reply from: [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * Last activity: [22 years, 4 months ago](https://wordpress.org/support/topic/archives-1/#post-33386)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
