simple mod_rewrite

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
dotphp
Forum Commoner
Posts: 25
Joined: Sat Nov 10, 2007 8:03 am

simple mod_rewrite

Post by dotphp »

Hi

How can I simplify the mod_rewrite:

Code: Select all

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
Post Reply