Questions tagged [url]

Denotes question about URL issues and custom URLs.

5
votes
2answers
13k views

How I can get secure url (https) of CMS page using url_key?

I have enable SSL and one of CMS is restricted for register users. And this page is in footer. If logged in user try to access without https it fails and redirect to my account. I want that ...
5
votes
3answers
2k views

Case Sensitive URL Rewrites

I wish to create a series of rewrites so that the following redirect occurs: Request: Category/ProductName.html Target: category/productname.html At present, visiting Category/ProductName.html ...
5
votes
2answers
8k views

Include categories in product URL

I have a product object and I need to get product URL of it that will include all its categories e.g. - http://example.com/category/subcategory/product_name I've managed to find a way that will ...
5
votes
1answer
4k views

Magento : How to hide the default Store View code from the url

The site has 2 languages: English and French, represented by 2 store views. French is the default one. For our SEO efforts we need to have the following urls: French - http://www.domain.com/category/...
5
votes
1answer
4k views

Compare link on detail page

I need to implement Compare button as a link on product detail page. What I trying to do: <span><a class="btn-compare" onclick="popWin('<?php echo $_helper->getListUrl() ?>','...
5
votes
2answers
13k views

Remove unnesessary URL rewrites

I'm trying to leave just one type of URL for product pages, it looks like this: http://example.com/category/subcategory/product-name But Magento automatically creates two more: http://example.com/...
5
votes
2answers
691 views

Set skin url as unsecure in email template at the backend

Is there a way to set skin url to be unsecure in img tag in email template content at the Magento backend. My tag would be: <img src="{{skin url="images/registration-email/logo.jpg" _area="...
5
votes
1answer
4k views

Is there a way to pass a coupon code as a URL parameter?

I would like to create URLs which activate a specific coupon. It could be as simple as passing the coupon code as a URL parameter. When a coupon is passed, I'd like it to automatically be populated ...
5
votes
1answer
97 views

Friendlier URL for admin pages?

I'm trying to determine how to remove index.php from the Admin page URLs. I already know how to do it for SEO on public facing pages as is documented here. And "Use Web Server Rewrites" is already ...
4
votes
3answers
8k views

Redirected to the Homepage when removed www. from URL

Say, My Website is : www.example.com I have one page : www.example.com/contactus If I remove "www." from above url, means : example.com/contactus It redirects me to the homepage. Why ?? Checkout ...
4
votes
1answer
2k views

Add query parameter to current url in phtml

I want to add query parameter to my current url, I'm getting current url in my phtml like this: $current_url = $this->getUrl('*/*/*', ['_current' => true, '_use_rewrite' => true]); I want ...
4
votes
2answers
7k views

Where is the admin path located in database?

I want to find out where does Magento2 keeps it's admin path in the database? Any suggestions will be appreciated.
4
votes
1answer
861 views

What is the rationale behind the ___store and ___from_store URL query parameter?

I need to decide whether I list these query parameters out in Search-Engine-Indexers (like it's advisable for SID) or if I can safely remove them from the pre-made templates (language switcher). With ...
4
votes
2answers
4k views

Indexing for large database is taking so much time

I have imported more than 1M of products for two stores. I am trying to indexing those products but it is taking long time through Admin and SSH. "Catalog URL Rewrites, Product Flat Data, Catalog ...
4
votes
1answer
2k views

Magento 2: Create a Page with Dynamic URL with Same Controller

I posted a question earlier but didn't able to understand the answer, Magento 2: How to create a dynamic url with the same controller i want to create a page with the dynamic url but with same ...
4
votes
1answer
1k views

How do I get Http_referer path without “http://localhost/index.php/”?

I want to get the preview page url using: Mage::helper('core/http')->getHttpReferer(); and it get's me something like: http://localhost/index.php/customer/account/ How do I get just : customer/...
4
votes
2answers
2k views

Magento 2: Getting a Product URL from the API

In Magento 2, is is possible to get a product's URL using the information returned via the API/Repositories? That is, when grabbing a list of products from the API, the url_key will be returned as ...
4
votes
2answers
753 views

How to use a DOT (.) in a product URL

I wonder if it is possible to use a DOT (.) in a product URL in Magento. I want to create a product URL that looks something like this: http://www.domain.com/galaxy-tab4-10.1.html But when I try to ...
4
votes
4answers
4k views

Magento 2 change urlkey and set custom product urlkey

I want to change my Magento 2 product urlkey and set something like example.com/product-name/product-id instead of example.com/product-name.html. Where do I have to change it while saving product ...
4
votes
1answer
547 views

Using chinese characters in base_url - how to edit regex in Http.php to allow valid() to pass?

for a multi-site setup we are about to launch a chinese store, which has chinese characters in the base url. Howeverer, using .htaccess to load the correct store view, we receive a "Invalid URI ...
4
votes
2answers
8k views

How To Set Product URL Key OR Redirect URL in PHP

So I am creating a Magento product when I call this if statement and it returns false, that all works... I just want to create the URL or create a URL redirect for the product in the same statement ...
4
votes
2answers
2k views

Add to cart redirect

How can redirect to a CMS page when the "add to cart button" (on a product view page) is clicked? I have already disabled the redirect to the cart page after the "add to cart" button is clicked. Now ...
4
votes
1answer
2k views

How do I get correct ajax url for backend?

I am trying to make an ajax call to reload the information on the category edit page. I know the url I am trying to create is catalog_category/edit, but $this->getUrl('catalog_category/edit') ...
4
votes
1answer
3k views

Catalog URL Rewrite after daily import/update of Product

We have a scenario where we import/update products (about 12K of them) on daily basis, everything is working fine with the imports. We have different store-views (languages) in a shop. But when the ...
4
votes
1answer
673 views

Magento 2 - Wordpress Integration url issue

I am using a magento 2.1.8 site. I have installed wordpress in a subdirectory of my root directory. I have integrated the wordpress and magento site by using fishpig wordpress extension. All other ...
3
votes
2answers
2k views

Link directly to a tab in adminhtml tab widget

Is it possible to link directly to a tab on a backend page, using URL fragments? In particular, I want to link to the "Manage Label / Options" tab on the "Edit Product Attribute Page": I hope for ...
3
votes
3answers
5k views

Magento multistore, __store and ___from_store in URL

we are setting up a multistore. Now we see "__store and ___from_store" in the UR. Is there an easy (and accepted method) of utilizing the functionality, but hiding the url string "__store and ...
3
votes
3answers
368 views

://index.php/? is adding at the end of the url for first time

when we open a site : http://ab1.domain.com/ for first time in browser, it will redirect to below url http://ab1.domain.com/://index.php/? & give 404 Not Found 1 ://index.php/? is adding as ...
3
votes
2answers
5k views

Add Configurable Product To Cart Via Query String In 1.7

Note: This is a X-Post from StackOverflow, I put it there before remembering this subexchange existed so apologies for the double-up. My issue is surrounding the Add To Card method for configurable ...
3
votes
3answers
4k views

Magento 2 get url for specific store

I need to render inside admin grid preview url for specific store (depends on which store is selected). In Magento 1 the code is this: $storeId = (int)$this->getRequest()->getParam('store'); if ...
3
votes
2answers
6k views

Why Magento has .html suffix?

Why does Magento add a .html suffix on the URLs? I mean without this suffix it is better for SEO.
3
votes
2answers
513 views

Help me understand how Google bots find product “id” links and how to block without negative impact

I've been periodically checking Google Webmaster Tools and recently noticed a large number of ERROR 500 messages for links to pages that do not exist. Example: http://www.mysite.com/eng/catalog/...
3
votes
1answer
3k views

How to get base url of default website?

I need to use the function file_get_contents() on default website's base URL. Currently there are many websites in magento system. How to get the id of default website and base URL?
3
votes
2answers
6k views

Product not adding to cart

When opening up a product page (example.com/store/women/catalog/product/view/id/215/) in a new session and using the standard add to cart, my product gets dropped and says the shopping cart is empty. ...
3
votes
1answer
918 views

Magento 2 - Set global variable

I want to know if it's possible to add a global variable all through the site (so that if I need to change it, I would only need to do it once). It's for an URL.
3
votes
1answer
73 views

The URL is getting concatenated

In my Magento store, the URL of the selected page is getting concatenated with the existing URL that is for example if I am in the URL http://electric.com/ninja and select another option in the menu ...
3
votes
1answer
586 views

Magento 2 secure URL

I am trying to get a secure url like this: $this->storeManager->getStore()->getUrl('someurl', ['_secure' => 'true']); I still get an insecure url with http://... What am I doing wrong?
3
votes
2answers
2k views

Get all Magento URLs by store view

I'm looking to retrieve all URLs of a Magento website (CMS pages, categories, products...) subdivided by store view. Something like the default Magento Sitemap, but with a different format: ...
3
votes
2answers
8k views

Magento install in subfolder of ServerRoot: how to use server rewrites to get rid of subfolder in all URLs

I would like to summarize: I want to know if it is possible to install Magento on Linux with the following configuration: I do not have root access and so cannot modify the DocumentRoot directive to ...
3
votes
2answers
114 views

Max URL Levels in Controller Magento 2

I have custom controller outputting JSON format which works well for the below URL level; ** Works base url/module/folder/action //equates to Vendor\Module\Controller\Folder\Index.php However I ...
3
votes
2answers
83 views

Url doesn't work after adding new page [closed]

Today i added a new page on my magento webshop.. nothing special. But after i added that page, everytime i go on another page it adds .html in the Url and it just gives me a empty html page. I didn't ...
3
votes
3answers
2k views

How to remove parent category from subcategory URL?

I want to remove the parent category from the subcategory URL. For example, I would like to change: www.magento2.com/Category1/Category2/gear/bags.html to www.magento2.com/bags....
3
votes
1answer
2k views

Is there a way to use multiple URLs for one Magento setup?

I am planning to use Magento with multiple languages. I was thinking of doing this: English: Magento: //website/store/[...](params for Magento) French: Magento: //website/magasin/[...](params for ...
3
votes
1answer
24 views

Magento 2.3 How to create custom cms page url?

I have use Magento 2.3 Question: How to modify custom CMS page URL structure? For example: I want to this type of page link. http://mydomainxyz.com/parent-service/childpage At present we are only ...
3
votes
1answer
325 views

What's the purpose of the unique index on 'value' in 'catalog_product_entity_url_key'?

We're on a heavily modified EE 1.13.0.2 with some 20 store views - some of them sharing the same language - facing a problem with url keys. These are generated and differ per language BUT this doesn'...
3
votes
1answer
2k views

Set configurable attributes + custom options via url on product page in Magento

I have a Magento shop with some configurable products. Those products have 3 configurable attributes from an attribute set and 1 custom option that is set on the configurable product itself (so not ...
3
votes
1answer
480 views

User redirected to a really bad URL after logging into Magento-based site with Safari on Mac OSX & iOS [closed]

I really don't know what to call this. It seems only to happen on both Mac OSX and iOS with Safari. It doesn't seem to affect Chrome even though they are both Webkit-based. I'm working on a B2B ...
3
votes
1answer
631 views

Make backend url domain different from frontend url domain

How to make different URLs for website frontend domain URL and admin domain URL for Magento 2? currently, this is how I access my Magento 2 site: frontend: https://magento.zzz backend: https://...
3
votes
1answer
114 views

How to add a virtual url in Magento 2

I have the following situation: I have a multiple store views and for one of the store I have let's say this url: wwww.myurl.com. What I try to do, is to change the base url to : www.myurl.com/...
3
votes
1answer
73 views

Gel All Product images url using product id

Most of magento products have more than one product image, i've read this post on how to retrieve product image url, but it seems it only retrieve one image, i want to to load the product images url ...