wordpress permalinks fix.

jappler.com Web Development WordPress

I had been struggling with the the next/previous links on my WordPress blog now for several months. Nothing excites me about mod_rewrite and permalinks in general. I know both are very powerful, but with power comes frustration.

My problem: All my permalinks were working correctly except for the next page/previous page links. WordPress was trying to use the URL: https://www.jappler.com/blog/page/1/ which was not working.

My setup: I am using WordPress as a CMS so my site is all in WordPress. My WordPress and blog address are the same: https://www.jappler.com (anything else produced an internal server error). I am using a custom permalink structure: /blog/archive/%year%/%monthnum%/%day%/%postname%.php All blog posts go into the “general” category by default.

My solution: I finally did some research and figured out two things:

So, to fix the setup, do not worry about the Blog URI and WordPress URI, they both should be the same (assuming your WP files are in the root of your web site folder).

Using a WordPress page as the home page:
Create a page with a “page slug” of “home” for the page you want to be your home page. Also create a home.php template file and have the following code before the WordPress loop: and choose the “Home” template for the “Home” page.. This will take care of using a WordPress page as the home page.

To take care of the blog at /blog/:
Create a page with a “page slug” of “blog”. Create a new template called blog.php and in it, use the following code:



 

and choose the “Blog” template for the “Blog” page.

[tags]WordPress, mod_rewrite, permalinks, jappler.com[/tags]

One thought on “wordpress permalinks fix.”

Leave a Reply

Your email address will not be published.
*
*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Videos

Out With Rocketboom, In With Amanada Across America!

I have been a faithful Rocketboom video blog watcher for almost a year now. I was very disappointed when Amanda Congdon left the scene as the host, but I thought I would give the new host a chance. After a few months of watching Rocketboom post Amanda I have finally decided to stop watching it…I […]

Web Development

a web browser kind of week.

The last few days have been pretty busy in the web browser world. The big news: Microsoft released Internet Explorer 7.0. I downloaded it, installed it and was pleasantly surprised. Finally Microsoft is making text look good with anti-aliasing. (One of my biggest pet peeves with Windows in general). After taking a quick look at […]