1

I would like to rewrite a URL with a subdomain to a Magento category. For example, I would like to write the URL:

godiva.my_magento_store.com 

to

magento_store.com/godiva.html

or even better

my_magento_store.com/godiva

More than willing to play with both Magento and webserver configuration.

My thanks in advance.

2

Depending on Apache versus Nginx you will end up with different rewrites. But I would make a vhost for subdomain, first. Then put the rewrite or redirect under that vhost to go to the proper sub-page/category.

The docs on Nginx rewrites are here http://nginx.org/en/docs/http/ngx_http_rewrite_module.html

Apache is here http://httpd.apache.org/docs/2.0/misc/rewriteguide.html though you'll have just as much luck with the 2 trillion links about Apache rewrites through Google :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.