HI
I have a problem with creating the correct file. htaccess which would distinguish - while creating friendly links - whether two variables are being given, whether only one.
Basic form of file is (it is only a part of the file. htacces)
RewriteRule (.*)
http://www.web.com/$1 [R=301,L]
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
It of course forms links in the form:
http://www.web.com/somedocument
Some of documents are using the second variable given and read out through specially written snippet.
How correctly to write the file. htaccess so that distinguishes, whether two variables are being given whether one. I want to create nice url in the form
http://www.web.com/somedocument,1
(second variable after the comma - numbers from 1 to 3)
Of course such a
http://www.web.com/somedocument?p=1 always works, but I would like to let it in through mod rewrite and to make the nice Furl.
I tried something like that, but it doesn't work
RewriteRule ^(.*),(.*)$ index.php?q=$1&p=$2 [NC]
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Thanks for the help.