.htaccess - Shorten Long URL using htaccess file -


i shorten url using htaccess

http://mydomain.com/filename/categoryname/catid/subcategoryname/subid/productname/productid/

to

http://mydomain.com/productname/

been searching hours on how achieve nothing seems work.

did try mod_rewrite?

rewriteengine on rewritemap shortcodes txt:/path/to/file/shortcodes.txt rewriterule ^/(\d+)$ ${shortcodes:$1} [r=permanent,l] 

for example, in case, might this:

productname  /filename/categoryname/catid/subcategoryname/subid/productname/productid/ 

and should go in virtualhost definition


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -