How to get site URL – Magento

You can use the following function to get site urls .

Below given are the function with different arguments

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) – http://phpcodez/js/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) – http://phpcodez/index.php/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) – http://phpcodez/media/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) – http://phpcodez/skin/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)  -http://phpcodez/
$currentUrl = $this->helper(‘core/url’)->getCurrentUrl();

25 thoughts on “How to get site URL – Magento”

  1. I?d must examine with you here. Which is not something I usually do! I take pleasure in reading a submit that will make folks think. Additionally, thanks for allowing me to comment!

  2. Hi there I am so glad I found your webpage, I really found you by mistake, while I was searching on Digg for something else, Anyhow I
    am here now and would just like to say cheers for a tremendous post and a all round interesting blog (I also love the theme/design), I don’t have time to go through it all at the minute but I have saved it and also added your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep up the awesome work.

  3. Greetings! I’ve been following your blog for some time now and finally got the bravery to go ahead and give you a shout out from Porter Texas! Just wanted to mention keep up the fantastic job!

  4. Very great post. I just stumbled upon your blog and
    wanted to say that I’ve really enjoyed browsing your blog posts. After all I’ll
    be subscribing in your feed and I am hoping you write again very
    soon!

  5. It’s a pity you don’t have a donate button! I’d most certainly donate to this brilliant blog! I suppose for now i’ll settle for bookmarking and
    adding your RSS feed to my Google account. I look forward to fresh updates and will talk about this blog with my Facebook group.
    Talk soon!

  6. Excellent beat ! I would like to apprentice while you amend your site,
    how can i subscribe for a blog web site? The account aided me a acceptable deal.
    I had been tiny bit acquainted of this your broadcast offered
    bright clear idea

  7. Heya i am for the first time here. I came across this board and I
    find It really useful & it helped me out much. I hope to give something back and aid
    others like you aided me.

  8. Great post. I was checking continuously this blog and I
    am impressed! Very useful info specifically the last part 🙂 I
    care for such info much. I was looking for this particular information for
    a very long time. Thank you and good luck.

  9. We are a group of volunteers and opening a new scheme in
    our community. Your web site offered us with valuable info to work
    on. You have done an impressive job and our entire community will be grateful to
    you.

  10. Good day! Would you mind if I share your blog with
    my twitter group? There’s a lot of people that I think would really enjoy your content. Please let me know. Cheers

  11. Hey there! This is my 1st comment here so I just
    wanted to give a quick shout out and tell you I genuinely enjoy
    reading through your blog posts. Can you recommend any other blogs/websites/forums that cover the same
    subjects? Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *