hey there, i have quite some issues with the mode rewrite here is what i use :
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /creatii.php?creatie_thumb=$2&user=$1 [L]
RewriteRule ^([^/]*)/$ /creatiiuser.php?user=$1
i would like this link :
http://creatii.artcrew.ro/creatii.php?creatie_thumb=creatie19&user=dee-dee
to look:
like http://creatii.artcrew.ro/dee-dee/creatie19
well this is fine, it works, no problems with it but i want to make a rule for another link
http://creatii.artcrew.ro/categorii.php?numecat=poetry&numesubcat=satire
to look like
http://creatii.artcrew.ro/poetry/satire
how can i do this? what rules must i use?
currently if i access http://creatii.artcrew.ro/poetry/satire
it access the link : http://creatii.artcrew.ro/creatii.php?creatie_thumb=satire&user=poetry
how can i make both links(the first one and the second one) work?
one more thing, i want this link : http://creatii.artcrew.ro/creatiiuser.php?user=Dan to look like http://creatii.artcrew.ro/Dan or if that does not work http://creatii.artcrew.ro/user/Dan
how can i do that?
can anyone help me?
thanks in advance
Given the URL
http://creatii.artcrew.ro/X/Y, how is mod_rewrite supposed to know whetherXandYarecreatie_thumbanduservalues ornumecatandnumesubcatvalues?You need to add something to the URL to differentiate these cases.
For example:
http://creatii.artcrew.ro/user/dee-deehttp://creatii.artcrew.ro/user/dee-dee/creatie19http://creatii.artcrew.ro/cat/poetry/satireRewriteEngine On RewriteRule ^user/([^/]*)/([^/]*)$ /creatii.php?creatie_thumb=$2&user=$1 [L] RewriteRule ^user/([^/]*)/$ /creatiiuser.php?user=$1 [L] RewriteRule ^cat/([^/]*)/([^/]*)$ /creatii.php?numecat=$1&numesubcat=$2 [L]