mod rewrite - Only redirect the parent folder and not sub folder .htaccess -


i struggling redirect rule following scenario:

parent folder/site (landing page)

/about/leaders

sub sites (link profile)

/about/leaders/name1 /about/leaders/name2

i need deactivate /about/leaders page , redirect / but, profiles should still online.

it must similiar =

redirectmatch 301 /about/leaders/(.*) / redirectmatch 301 /about/leaders(.*) /$1 

but doesn't work. on subprofiles, part /about/leaders gets remove , /namex stays. couldn't find answer that. maybe other people achieve similiar.

anyways, glad every help

greeings jens,

think need 1 line of code

redirectmatch 301 ^/about/leaders/?$ / 

i anal using anchors. first anchor leading portion of url ^. optionally match trailing "/" ?. anchor tail end of url via $. should it. no need second directive.

since more extended urls of /about/leaders/name not match pattern, should accessible normal.

hope helps!


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -