| Posted: 05 July 2011 at 9:42am | IP Logged
|
|
|
thank you for getting back to me so promptly,
The reason i thought i needed to upgrade was from a post on stackoverflow that exlplains how to do url rewtiting. http://stackoverflow.com/questions/5776208/mod-rewrite-for-url-variables-removing-empty-parameters-and-using-more-than-1fie
I am still in the very early stages of learning about url rewriting.
The method in question on stack overflow does not relate directly to the site i am doing, but from reading it seems like the way i would like to use for the site i am working on.
The rules in the solution (relate to mod_rewrite not isapi rewrite) Hence why i upgraded to ape thinking it would provide the extra Options +followSymlinks - Multiviews, as when i tried to put the following rules in, isapi rewrite says they are not supported, i didn't actually try without the options bit, i just assumed ape would allow me to add the full rewrite rules as below.
The rules suguessted are as follows:
Options +FollowSymlinks -MultiViews RewriteEngine on
# 404 handler ErrorDocument 404 /notFound.php
RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^handler1/([^/]+)/?$ /?page=$1 [NC,QSA,L] RewriteRule ^handler1/([^/]+)/([^/]+)/?$ /?page=$1&cat=$2 [NC,QSA,L] RewriteRule ^handler1/([^/]+)/([^/]*)/([^/]*)/?$ /?page=$1&cat=$2&subcat=$3 [NC,QSA,L] RewriteRule ^handler1/([^/]+)/([^/]*)/([^/]*)/([^/]*)/?$ /?page=$1&cat=$2&subcat=$3subsubcat=$4 [NC,QSA,L]
RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^handler2/([^/]+)/?$ /?othervar1=$1 [NC,QSA,L] RewriteRule ^handler2/([^/]+)/([^/]+)/?$ /?othervar1=$1&othervar2=$2 [NC,QSA,L] RewriteRule ^handler2/([^/]+)/([^/]*)/([^/]*)/?$ /?othervar1=$1&othervar2=$2&othervar3=$3 [NC,QSA,L] RewriteRule ^handler2/([^/]+)/([^/]*)/([^/]*)/([^/]*)/?$ /?othervar1=$1&othervar2=$2&othervar3=$3othervar4=$4 [NC,QSA,L]
like i said i am no expert in rewriting.
i have a main index page which will pass parameters to an index page, i am assuming the ^handler/ bit relates to the folder that my index.php page is in. though i could be wrong.
my site is set-up so i have an index.php pahe in the route which will recive a url parameter called category. for example index.php?category=white-wine
i wouldlike this rewritten as: mydomain.com/white-wine both with and without the trailing / depending on if its typed into the address bar or not.
in addition when records are paged through it will send an additional 2 parameters. page and maxrecords
so the url would become index.php?category-white-wine&page=3&maxrecords=200
which i would like to be mydomain.com/white-wine/page3/300
ideally without the 300 but i belive this would be impossible?
i hope you can help me with this, either with or without APE and if i do not require ape for this maybe i could have a refund to the upgrade i made?
once again thank you for your time, my apologies that i do not understand this all more fully!
|