apache - Using .htaccess mod_rewrite to pass all URLs in a given directory to a single redirect script -


im trying use mod_rewrite redirect call /real-estate/* rewrite.php...i know can redirect rewrite.php this:

rewriterule ^(.*)$ rewrite.php?url=$1 [l] 

i have urls formatted /real-estate/12345/123-anywhere-st ....where 123-anywhere-st ignored, , have /real-estate/12345 sent rewrite.php...id rewrite rule used on /real-estate...all other areas of site should function is...ive searched on tutorial or cheat sheet, none can find explain how format mod_rewrite rules, give 1 or 2 examples , thats it...can help, maybe provide link somewhere can learn

thanks!

rewriterule ^/real-estate/(.*)$ rewrite.php?url=$1 [l]


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -