Questions tagged [.htaccess]

Questions about `.htaccess` files in Magento, used to configure the Apache webserver

Filter by
Sorted by
Tagged with
1
vote
1answer
339 views

Redirect 301 removing parameters in URL by .htaccess

In the file .htaccess in magento, I want to redirect a url with parameters. An example is this: https://example.com/presente/decoracao/teu-sorriso?PageSpeed=noscript I need to redirect this to the ...
1
vote
1answer
58 views

Nice, clean URL for my store

I want that that, when I navigate to myStore.com the displayed contents are actually the ones of myStore.com/subdirectory but without changing the URL. I tried different configurations of ....
1
vote
1answer
556 views

Multistore using .htaccess not working

One method for controlling multiple stores involves adding SetEnvIf statements to .htaccess to set server variables MAGE_RUN_CODE and MAGE_RUN_TYPE. http://devdocs.magento.com/guides/v2.1/config-...
1
vote
1answer
1k views

301 Redirects dont work with index.php in OLD URLs

I moved my old store to magento, Im using 1.9.2 CE Magento. Old store was up and running for years and I didnt want to loose SEO URLs, so when I try to do 301 redirects, Im facing a problem. If old ...
1
vote
1answer
357 views

Caching css files in Magento

Because of the Black Friday, I've added some products as an offer. They can be shown on the main page with a block I had initially hidden with some CSS on my styles.css file. This morning, I removed ...
1
vote
1answer
154 views

.htaccess rewrite

I have this url which is working: http://www.example.com/linea?linea=7 It gives me all the products of the category "linea" filtered by the custom parameter "linea", in this case the value is equal ...
1
vote
1answer
191 views

My shopping cart works randomly when moving to different pages

I've spent hours and days trying to fix it but I can't figure out why when I move from one page to another my cart changes. First of all I add a product to the cart. The cart updates itself and I can ...
1
vote
1answer
259 views

Change URL for /cat/

I want to put a Magento Redirect rule to change the URL for filtering products and category. When I use the filter in a category, the urls are look like this : FROM: http://example.com/redwine TO :...
1
vote
1answer
464 views

Yandex bot in my website

I have noticed that when I'm surfing my website, where it appears the Waiting for www.whatever.com... on the left-bottom corner from google chrome it appears suddenly a Waiting for mc.yandex.com... ...
1
vote
1answer
12k views

PHP.ini and htaccess files missing 1.9 magento

Hi im creating a magento website for a tile company and having some problems with "memory size of 33554432 bytes exhausted" when i try to create a configurable product it gives me front end errors and ...
1
vote
0answers
351 views

How to redirect default store view to en?

I've got a store with 2 stores, one with 2 languages and the other just 1. So: Website > Store1 > English (www.site.com/en) Website > Store1 > French (www.site.com/fr) Website > Store2 >...
1
vote
0answers
128 views

Magento 2 - how do i redirect “mydomain/pub” and “mydomain/pub/media” path to homepage?

I'm trying to redirect "mydomain.com/pub" and "www.mydomain.com/pub/media" to homepage (mydomain.com). Currently, "mydomain.com/pub" path shows the homepage with no css and js loaded, and "www....
1
vote
1answer
29 views

.htaccess redirect samplesitex.com to samplesitey/alias-page in both https and http variants

I am trying to redirect an alias url to a different url path. (it wont let me do this in cpanel for some reason) Example: SiteX.com > SiteY.com/this-page I have tried RewriteCond %{HTTP_HOST} ^...
1
vote
0answers
43 views

Are the Magento 2.1.14 rewrite rules in htaccess file working properly?

In the default htaccess file in Magento 2.1 there are some RewriteCond's and RewriteRule's that are explained in the htaccess.sample file that comes with Magento 2.1. never rewrite for existing files,...
1
vote
1answer
1k views

404 Error when accessing image in pub/media

Ive been struggling with this for a few weeks now and dont seem to be getting anywhere. I have installed a module that reads images from a directory 'pub/media/import' however when I navigate to the ...
1
vote
0answers
1k views

Mysql server goes down with queries in SLEEP STATE when I access magento site

We have a Magento 1.9.2.4 site. We are accessing it on using a subfolder and subdomain as http://dummysite.com/magentosite and http://magentosite.dummysite.com Here we would live to mention that our ...
1
vote
0answers
74 views

How avoid user authentication for one single url in htaccess?

SetEnvIf Request_URI "^/wp-content*$" AdminUri AuthUserFile /public_html/.htpasswd AuthType Basic AuthName "My Secret Folder" Require valid-user I set up authentication in my site as above. I ...
1
vote
1answer
473 views

How to map a dynamic url to a function in controller

I'm creating a new magento module. The frontend name of the module is groupedproduct. Now i need to map a dynamic url to indexAction of the IndexController. For example the url will of the form http://...
1
vote
1answer
1k views

var .htaccess not activating - cacheleak vulnerability

I recently ran a magereport.com scan on one of our magento sites and it reported a cacheleak vulnerability. In my var folder, there is an .htaccess file but it is not activating and the ...
1
vote
0answers
73 views

Subfolder as Magento storeview

I am trying to access a store view in Magento 1.9.1.1 from a subfolder. I have: www.webshop1.nl => store_1 + default www.webshop2.nl => store_2 + storeview_NL www.webshop2.nl/en => store_2 +...
1
vote
1answer
96 views

Admin not working on development site

A client's web hosting support have created a development site for me @ dev.example.com. When I try to load http://dev.example.com/admin, I am redirected to https://dev.example.com/index.php/admin/, ...
1
vote
2answers
654 views

Magento 1.8.1.0 can't login to admin panel - htaccess/memcache suspected

I have recently setup one of my client's live site to local. And was unable to run it on local instantly just after modifying core_config_data and local.xml, then I opened .htaccess and found ########...
1
vote
0answers
159 views

Sub-domain Stores on Local Dev Server

I have a live Magento site with a main store and also white-label stores located on sub-domains, all running out of the same Magento website. I'm using .htaccess to direct sub-domains to the ...
1
vote
1answer
1k views

How to prevent duplicate content issues caused by index.php in urls?

I've been trying to prevent our homepage from displaying as both www.domain.co.uk & www.domain.co.uk/index.php but now i've realised that every other page displays with /index.php in the url. ...
1
vote
0answers
42 views

Magento 1.8 - Very strange issues with redirects caused by our hosts tech support team

We asked our hosts tech support to change the 302 redirects to 301's...after numerous attempts by them i gave up on them and accepted that they could not do it. Now they have left us where none of ...
1
vote
0answers
46 views

Picture generation does not work after URL redirect in .htaccess

Picture generation does not work after URL redirect in .htaccess with the following script: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{...
1
vote
0answers
195 views

Multi-website Setting

To setup multi-website store, I'm following this https://www.magentocommerce.com/knowledge-base/entry/tutorial-multi-site-multi-domain-setup I think I did everything but Edit the .htaccess As the ...
1
vote
1answer
4k views

Magento - “Create Permanent Redirect for old URL” in bulk

We have 20,000 listings and had to bulk update Name (title) for all of them. We want the URL to be in accordance with new Name, but we want to keep the old URL's as well and have them 301 redirected ...
0
votes
2answers
8k views

Moving from http to https - redirect via htaccess file

All my urls were unsecured and was indexed by google like that. Now I'm planning to secure all my pages with https But when the old urls show up on google search they automatically resolve to the ...
0
votes
3answers
2k views

Magento multi-store configuration

I'm trying to run multi-store environment (2 websites) on single Magento instance according to this post :https://www.nublue.co.uk/blog/creating-a-magento-multi-store-using-symlinks/ but I can't ...
0
votes
2answers
795 views

Redirect all pages to homepage via .htaccess except backend

I've been trying to redirect all pages of my Magento website to homepage via .htaccess - except the backend, naturally. Currently, I'm using these rules and everything is working fine so far but I ...
0
votes
1answer
687 views

This page isn’t working hotandbold.com redirected you too many times

My Magento Backend URL is not working and fronted is working Properly. Backend Url:- http://hotandbold.com/staging/admin_jewellery/ Fronted Url:- http://hotandbold.com/staging/ Can You suggest me, ...
0
votes
3answers
464 views

what are the correct setting for the .htaccess file?

My hosting company deleted my .htaccess file (they thought they were helping me resolve a different problem). Now - my .htaccess has the following info only: Order deny,allow Deny from all I found ...
0
votes
1answer
67 views

Apache configuration file for Magento 2.4

I have installed Magento 2.4 on Apache 2 sever running on Ubuntu 20.x When I try to load the magento root directory on browser, I get Not Found The requested URL was not found on this server. I have ...
0
votes
2answers
272 views

The requested URL /pub/ was not found on this server. - Magento .htaccess problem

I have an problem about magento 2.4.2 Installed magento 2.4.2 using Composer-CLI. But I can't access magento homepage (http://localhost:8888/magento2) The requested URL /pub/ was not found on this ...
0
votes
1answer
199 views

CORS Header allow cross origin not working for google fonts

Here I have some code in my .htaccess file <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" Header set X-UA-Compatible "IE=edge" # `mod_headers` cannot ...
0
votes
1answer
110 views

other website/store/store front does not load; .htaccess file is missing

Magento 1.9.1 Porto theme My hosting company created a new account for me and moved my existing account there. That replaced the broken cPanel account and I am now able to access the database via the ...
0
votes
2answers
1k views

EDIT: How to protect index.php/admin url using htaccess

As accurate answers still not showing up, I had to take the alternative to remove index.php from http://example.com/index.php/admin Below is my code at the top of .htaccess file RewriteEngine on ...
0
votes
1answer
757 views

Redirect Magento site not working

Below is description with Example : I have 2 sites www.severnsaleslabequip.com and www.qualimet.co.uk with same admin (backend ). Now www.qualimet.co.uk site is no longer to needed so I want to ...
0
votes
1answer
418 views

Who to “enable Magento to use the distributed configuration file .htaccess”?

One of the steps in this Magento Apache2 installation guide is to "enable Magento to use the distributed configuration file .htaccess". In that step, they have a link to Apache2 page guideline .... ...
0
votes
1answer
2k views

While import/Export attributes get 500 internal server error [closed]

I am working on magento-1.9.2.1. I want to import and export attributes. for this, When I goto system ->import/export ->attributes ->import or export. I got following Internal server error. ...
0
votes
2answers
175 views

Patch failed because of .htaccess

I have Magento 1.9.2.1 installed and ran the script to install the latest security patch, SUPEE-6788. I got a fail message because of the .htaccess file. I uploaded the .htaccess file from the clean ...
0
votes
2answers
2k views

Remove specific word's from url using .htacsess

I'm trying to rewrite and remove some words from the URL using .htaccess. I have en url like this: http://example.com/es/ropita-de-bebe/chica/vestidos.html/ and I want to leave it like this: ...
0
votes
1answer
175 views

one splash page for two websites magento

My goal here is to create one splash page for only the two with the same domain. This page would link to each website (website2.com/store1, website2.com/store2). Using Magento, I have 3 websites with ...
0
votes
6answers
201 views

Magento 2 Fresh Install Showing 'Whoops, our bad…' 404 page not found

After install very fresh Magento 2, I am seeing Whoops, our bad... (404 Not Found) in all pages. Screenshot: I am using Linux Mint OS. Here is my steps: Installed Apache version is apache2 -v: ...
0
votes
1answer
41 views

Frontend and Backend is not Working : Magento 2.4.2 ( Internal Server Error)

I am using below configuration Magento 2.4.2 PHP 7.4 Composer 2 Elasticsearch 7.9.6 My installation is in subfolder https://162.241.125.112/Angel/angel Admi url is - https://162.241.125.112/Angel/...
0
votes
1answer
24 views

How to add 301 Redirect pages in magento 2?

I want to add 301 redirects to these URLs - 1-> From www.abc.com/blog To www.abc.com/blog/ 2-> From www.abc.com/contact To www.abc.com/contact/ 3-> From www.abc.com/catalogsearch/advanced To ...
0
votes
1answer
105 views

Magento 2 - remove .html from URL by using .htaccess

We have some wrong URLs in our store ending with .html. If the user opens such a URL, then the .html should get removed, otherwise the site cant get found. So I added this rule to my .htaccess file in ...
0
votes
0answers
10 views

Magento 2 - 404 page with no styling after migrating from localhost to server

I am a beginner to Magento 2. I have built a webshop locally without any problems. Now I want to host my webshop on a live server. After following multiple guides on how to do this and after fixing a ...
0
votes
0answers
17 views

CORS Header set Access-Control-Allow-Origin “*” not working for google fonts

I have this piece of code in my .htaccess file <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" Header set X-UA-Compatible "IE=edge" # `mod_headers` ...