Hello,
If the URL is returning to home page, then the URL may be redirecting to the home. Check in your .htaccess file and remove redirect. All you have to learn about SEO URL friendly is written in this page thirtydrums.com/seo-friendly-urls. Have a sneak peek and explore more on making SEO friendly URL's.
Regards,
Deepika