Results 1 to 5 of 5
Sep 23, 2009, 05:33 #1
- Join Date
- Jun 2008
- Gloucestershire, UK
- 0 Post(s)
- 0 Thread(s)
Files not loading after mod_rewrite
I've started building an online shop using a modularized system, where I'm adding all of the module's content to a variable and echoing out that variable in a single template.
I'm using Apache Mod Rewrite to change URL's from "site.co.uk?p=home" to site.co.uk/home using the rewrite rule below:
RewriteRule ^([a-z_]*)$ /index.php?p=$1 I still need to modify it to take uppercase and numbers.
My problem is that I need to pass data through the URL's so I've tried the following:
RewriteRule ^categories/([0-9]*)$ /index.php?p=categories&cat_id=$1 [L]
RewriteRule ^([a-z_]*)$ /index.php?p=$1
If I try site.co.uk/categories everything's fine but if I try site.co.uk/categories/7 to pass some data the page doesn't load the CSS file (even though the source code looks ok) and the images, but does receive the number.
Can anyone see where I'm going wrong?
I Should add that if I use site.co.uk/index.php?p=categories&cat_id=7 everything works as it's meant to.