Within my blog I have 1 folder with 4 php pages - index, viewpost, category and catpost.
Without the category.php page then the page rewrites correctly to show blog/category/(catpost).
If i click on the category link in the breadcrumb then it redirects to the index page.
However, I'd like to have the category.php file which then houses quick links to the sub categories. If i include this file then the url rewrites but the content is still the same. Where as without the category page the content changes as expected.
Here is the current basic htaccess
RewriteEngine On
RewriteBase /blog/
RewriteRule ^category/(.*)$ catpost.php?id=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^(.*)$ viewpost.php?id=$1 [QSA,L]
So the basic of what I'm trying to do but failing as I'm incompetent with these bits is:
Blog home page - blog Blog post - blog/(post name) Blog category page - blog/(category) Blog sub category page - blog/(category)/(sub-category)
Any insight, direction or answers would be greatly appreciated as I'm at a brick wall.
I hope this all makes sense as I'm rather new to this.
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire