expressionengine - How to .htaccess 301 redirect only if the final URL segment is empty -


i'm using expressionengine , generating url when viewing specific category:

domain.com/index.php/template_group/template/category_url_indicator/foo_category/

i redirect visitors if delete specific category final segment of url. example, if made url this:

domain.com/index.php/template_group/template/category_url_indicator/

i tried .htaccess 301 redirect redirecting shorter url redirected longer url. is, if put in .htaccess:

redirect 301 http://www.domain.com/index.php/template_group/template/category_url_indicator http://www.domain.com 

this redirected longer url become http://www.domain.com/foo_category/ - not required... suggestions welcome - thanks!

david.

try using redirect match instead, along begin/end boundaries:

redirect 301 ^index.php/template_group/template/category_url_indicator$ http://www.domain.com 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -