canadabeeau Posted January 22, 2010 Share Posted January 22, 2010 Hi I am currently running this mod_rewrite Options +FollowSymlinks RewriteEngine On RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ /index.php?uri=$1/$2/$3 RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ /index.php?uri=$1/$2 RewriteRule ^([a-zA-Z0-9]+)$ /index.php?uri=$1 Now I basically need a rule which will cater for $1 $2 $3 $4 etc by itself rather than me making it like in the above, I need a rule which will somehow automatically cope, any ideas? otherwise my mod_rewrite may get a bit messy :-( Link to comment https://forums.phpfreaks.com/topic/189398-compacting-my-mod_rewrite-code/ Share on other sites More sharing options...
cags Posted January 22, 2010 Share Posted January 22, 2010 That will only add one extra line of code, how deep a directory structure are you planning on having because more than 4 is getting a little ridiculous. Link to comment https://forums.phpfreaks.com/topic/189398-compacting-my-mod_rewrite-code/#findComment-999910 Share on other sites More sharing options...
canadabeeau Posted January 23, 2010 Author Share Posted January 23, 2010 hello cags, are you able to tell me the line of code to do it? Link to comment https://forums.phpfreaks.com/topic/189398-compacting-my-mod_rewrite-code/#findComment-1000311 Share on other sites More sharing options...
canadabeeau Posted February 2, 2010 Author Share Posted February 2, 2010 cags or anyone? Link to comment https://forums.phpfreaks.com/topic/189398-compacting-my-mod_rewrite-code/#findComment-1005379 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.