Hi, thanks for quick reply. Actually I will need to use two types of rewrites, one for the list(s) of items, an one for the item details page(s).
the URL will always start with this type of string:
http://www.mysite.com:myport/myprog?
I have three basic page types that i need rewrites for:
1 - the item detail url:
...TASK=itemdetail&itemno=56997&smurfid=12675409385920071015165836427390
2 - the item list url:
...page=62&smurfid=12675409385920071015165836427390
3 - info page:
...task=Info&smurfid=12675409385920071015165836427390
So the code would look something like this for the item detail, I guess?
- Code: Select all
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([itemdetail/]+)/([^/]+)/([^/]+)/?$ ./
myprog?TASK=$1&itemno=$2&smurfid=$3 [QSA,L]
For all other links it's not important to levae them search engine friendly, but then again they could be included into the same rules, if only for keeping linking the same way all over.
However,
can I include these different kind of rules into the same htacces or config file - that I'll have to do with rewritecond in some way, right, but how?I'd be very grateful for help on this, guess it'll save me from hours of reading and searching on the topic!! - You've got a really helpful place here
PS I have access to the apache config file and plan to put the rewrite rules there, I guess that will work just as well as in a htaccess file - besides the site is totally dynamic, so the html files don't exist actually.
- Code: Select all