PHP Developers Network
http://forums.devnetwork.net/

simple mod_rewrite
http://forums.devnetwork.net/viewtopic.php?f=30&t=136010
Page 1 of 1

Author:  dotphp [ Mon Jun 18, 2012 6:25 am ]
Post subject:  simple mod_rewrite

Hi

How can I simplify the mod_rewrite:

Syntax: [ Download ] [ Hide ]
RewriteRule ^picturi~peisaj-rural~([0-9]+)$ index.php?page=picturi&filtru=subiecte-detaliate&tip=peisaj-rural&gal=$1 [QSA,L]
RewriteRule ^picturi~peisaj-urban~([0-9]+)$ index.php?page=picturi&filtru=subiecte-detaliate&tip=peisaj-urban&gal=$1 [QSA,L]
RewriteRule ^picturi~rauri~([0-9]+)$ index.php?page=picturi&filtru=subiecte-detaliate&tip=rauri&gal=$1 [QSA,L]

RewriteRule ^picturi~abstract~([0-9]+)$ index.php?page=picturi&filtru=subiecte-generale&tip=abstract&gal=$1 [QSA,L]
RewriteRule ^picturi~altele~([0-9]+)$ index.php?page=picturi&filtru=subiecte-generale&tip=altele&gal=$1 [QSA,L]
RewriteRule ^picturi~animale~([0-9]+)$ index.php?page=picturi&filtru=subiecte-generale&tip=animale&gal=$1 [QSA,L]
RewriteRule ^picturi~compozitie~([0-9]+)$ index.php?page=picturi&filtru=subiecte-generale&tip=compozitie&gal=$1 [QSA,L]

 


Idea is not to show in the address bar "subiecte-detaliate" and "subiecte-generale", that why I use to insert manually each category in htaccess.
It's there a simple way?

Thanks

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/