Forum Moderators: phranque
RewriteEngine on
RewriteCond %{IS_SUBREQ} =false [OR]
RewriteCond %{REQUEST_URL} ^/common.*$
RewriteRule ^common.*$ /common/tech/handler.php?toto=home [L]
RewriteRule ^$ /common/tech/handler.php?toto=home [L,QSA]
RewriteRule ^(register|pricing) /common/tech/handler.php?toto=$1 [L,QSA]
RewriteRule ^app/([^/]*) /common/tech/handler.php?app=$1 [NC,L]
RewriteRule ^application.* /common/tech/handler.php?toto=home [L]
example.com/app/<something>/<any-junk-here> will be rewritten. The "any-junk-here" part of the request isn't validated. It should be validated OR you should add an end anchor to disallow anything after example.com/app/<something> using app/[^/]+$ or similar. The pattern allows URL requests with an extension to be rewritten. Is that what you want? If not then ] is more appropriate. [edited by: g1smd at 7:27 pm (utc) on May 26, 2011]
RewriteCond %{IS_SUBREQ} false
RewriteCond %{REQUEST_URI} ^common
RewriteRule ^common / [R=301]
RewriteRule !^(register|pricing|common|app) /common/tech/handler.php?toto=home [L]
RewriteRule ^(register|pricing) /common/tech/handler.php?toto=$1 [L]
RewriteRule ^app/([^/]*) /common/tech/handler.php?app=$1 [L]
RewriteRule ^application / [R=301]
[^/.] is more appropriate."
RewriteCond %{IS_SUBREQ} false
RewriteCond %{REQUEST_URI} ^common
RewriteRule ^common / [R=301,L]
RewriteRule !^(register|pricing|common|app) /common/tech/handler.php?toto=home [L]
RewriteRule ^(register|pricing) /common/tech/handler.php?toto=$1 [L]
RewriteRule ^app/([^/.]*) /common/tech/handler.php?app=$1 [L]
RewriteRule ^application / [R=301,L]