Hi!
I have search for an answer on this excellent forum, without getting an answer.
Probably because i havent looked as well as i should.
But anyway, here's the problem:
I have tried to do some Friendly URLs, and wondering for:
1st:
I have this link:
index.php?s=medlem&v=someuser
wich i have written this rule for (wich works perfect):
RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)$ index.php?s=medlem&v=$1 [QSA]
gives: www.site.com/someuser
But i also need a link with another switch, after the "medlem" and "v" switches that looks like this:
index.php?s=medlem&v=azplund&show=fotoalbum
i use this for it, but it doesnt work:
RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)/([A-Za-z0-9\_][A-Za-z0-9\_\-]+)$ index.php?s=medlem&v=$1&show=$2 [QSA]
should be: www.site.com/someuser/fotoalbum
Thats the first problem.
The second, if i get the above to work, how can i make these rules better:
RewriteEngine On
RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)/([A-Za-z0-9\_][A-Za-z0-9\_\-]+)$ index.php?s=$1&visa=$2 [QSA,L]
RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)/([A-Za-z0-9\_][A-Za-z0-9\_\-]+)$ index.php?s=$1&v=$2 [QSA,L]
RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)/([A-Za-z0-9\_][A-Za-z0-9\_\-]+)$ index.php?s=$1&u=$2 [QSA,L]
RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)$ index.php?s=medlem&v=$1 [QSA]
RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)/([A-Za-z0-9\_][A-Za-z0-9\_\-]+)$ index.php?s=medlem&v=$1&show=$2 [QSA]
RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)/([A-Za-z0-9\_][A-Za-z0-9\_\-]+)/([A-Za-z0-9\_][A-Za-z0-9\_\-]+)$ index.php?s=$1&forum=$2&id=$3 [QSA]
##index.php?s=soek_spel&quest=po&offset=15&typ=Spelets_Namn
RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)/([A-Za-z0-9\_][A-Za-z0-9\_\-]+)/([A-Za-z0-9\_][A-Za-z0-9\_\-]+)/([A-Za-z0-9\_][A-Za-z0-9\_\-]+)$ index.php?s=$1&quest=$2&offset=$3&typ=$4 [QSA]
RewriteRule ^([a-zA-Z\_]+)/([a-zA-Z\_]+)/([0-9]+) index.php?s=$1&$2&page=$3 [nc]
##RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)$ index.php?s=visa_forum&forum=$1 [QSA]
RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)/([A-Za-z0-9\_][A-Za-z0-9\_\-]+)$ index.php?s=$1&$2 [QSA,L]
RewriteRule ^([A-Za-z0-9\_][A-Za-z0-9\_\-]+)(/)?$ index.php?s=$1 [QSA]
RewriteRule ^spela/(.+)\.html$ /index.php?s=spela&spelet=$1 [QSA,L]
RewriteRule ^fullskarm/(.+)\.html$ /fullskarm.php?spelet=$1 [QSA,L]
RewriteBase /
The original link is always index.php?s="somepage"&dosomethingelse= bla bla
You guys get the point i suppose, feel like an complete idiot...
Best regards, azplund