Place this .htaccess in your 'ressourcer' directory.
I'm assuming you meant ?kat=dir
&page=1 as that is the correct way.
I'm unsure whether you'll need to rewrite to the index.php/pl/cgi or whatever script you're using, i'd recommend it, so here i've used index.php.
- Code: Select all
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([^/]+)(/([0-9]+)/?)? /index.php?kat=$1&page=$2
You will receive an empty page number if the /pagenumber/ subfolder isn't used and trailing /'s are optional (? after /'s). You could replace the RewriteCond with
- Code: Select all
RewriteRule /?index.php - [L]
You could also replace the [^/] in the first parenthesis with [a-z0-9] if your categories are only alphanumeric (then you'll probably want the [NC] flag).
There are lots of ways of doing it, all depends on exactly what you want.