Questions tagged [.htaccess]

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

Filter by
Sorted by
Tagged with
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
353 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
148 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
174 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
245 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
415 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
208 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
78 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
27 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
2answers
2k views

Magento 2 Leverage Browser Caching for Images, CSS and JS not any effect

As in Magento 1 to increase the page speed score and Y-slow score we have used Leverage Browser Caching for Images, CSS and JS code in .htaccess file but same script in Magento2 is not working. ...
1
vote
0answers
34 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
71 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
461 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
71 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
95 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
0answers
155 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
1answer
193 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
7k 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
294 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
3answers
461 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
71 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
1answer
619 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
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
712 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
378 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
166 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
172 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
1answer
76 views

How to add the webp format in the mod_expires part of the .htaccess file?

I add this line but it is not taken into account because the browser inspector tells me that the cache is 2 days for webp images: ExpiresByType image/webp "access plus 1 month" I use Plesk with ...
0
votes
1answer
14 views

For Magento2 how to apply a redirect rewrite in .htaccess file for all URL's from .html to /

For Magento2 how to apply a rewrite in .htaccess for all URL's from .html to / URL structure. The M1 store has .html as the end, the new M2 store has / as the URL ending for all products and ...
0
votes
0answers
28 views

RewriteRule for media path in .htaccess Magento-2

I want add RewriteRule in .htaccess for media path: From: https://example.com/media/wysiwyg/Test_data_123.pdf To: https://example.com/pub/media/wysiwyg/Test_data_123.pdf I have tried with ...
0
votes
2answers
50 views

magento 1 , how block bad bots on htaccess file

my site is constantly visited by bots and very often I would like to block them because of them, the load on php-fpm on log apache files i have this
0
votes
0answers
25 views

Internal Server Error 500 after upgrade Magento version from 2.2.6 to 2.2.10

After I upgrade the Magento version from 2.2.6 to version 2.2.10, I get Internal Server Error 500 when I try to access the website. I tried multiple solutions for example (a) removing var folder and ...
0
votes
0answers
180 views

CORS fix in .htaccess not working if website URL is without index.php in magento 1.9

Default my magento store is loading without index.php. Site is secured. for both there are rewrite rules in .htaccess file which are working fine. I have implemented following code in .htaccess ...
0
votes
0answers
30 views

Magento 2 firefox not redirecting from http to https

I have setup my ssl certificate and configured admin. Use secure URLs on storefront & Admin to YES When I do example.com in chrome to takes me to https://example.com but in Firefox it not taking ...
0
votes
0answers
19 views

Add new domain in new store view not work in magento 1.x

I created a new store view and new url. I config it in backend and add in htaccess like this SetEnvIf Host www\.my.web-abc\.com MAGE_RUN_CODE=berba_new SetEnvIf Host www\.my.web-abc\.com ...
0
votes
1answer
27 views

All my directories are accessible magento 1

All my directories (except app/) and my root files (install.php, index.php,.gitignore...) are accessible to the users.. Is it a problem ? I need to create a .htaccess for each my directories ? Thanks ...
0
votes
2answers
57 views

Magento 2 url key includes SKU number, how to remove?

The big problem with Magento somehow amending the url key to include the SKU where /product-title-stec00778.html should be /product-title.html and the SKU is SKU STEC00778 Any ideas? Not ...
0
votes
1answer
32 views

Htaccess file erased

I needed to add a line of code to my htaccess file so I downloaded it by FTP using Filezilla to my local machine I now see that the size of the htaccess file on the server is now 0 while the one I ...
0
votes
1answer
575 views

Rewrite rule for media images

we need to set rewrite rule for some images in Magento 2.2.5 using .htaccess rules or nginx conf Example 1 Request Path: https://www.example.com//media/catalog/product/cache/1/thumbnail/543x403/...