Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [.htaccess]

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

1
vote
0answers
26 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
1answer
22 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 ...
0
votes
0answers
18 views

Magento 2 Multistore URL Rewrite htaccess

Hi this might look like a repeated question, but I think my case might be very specific. It turns out that I have a project that has 2 stores and 3 store views, the client asked for a upgrade from M2....
2
votes
1answer
42 views

Remove '.php' from url redirect [closed]

I have an URL like: base_url/cloths/mens.php now when we click on this above URL then it should redirect to: base_url/wp/cloths/mens/ here we want to remove .php extension from URL after ...
1
vote
0answers
36 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....
0
votes
1answer
73 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/...
1
vote
1answer
190 views

Magento 2 .htaccess file missing in pub folder

I was recently trying to upgrade my Magento 2.2.7 to Magento 2.3.0 and the following message came up in component dependencies Found non-writable path(s): /var/www/vhosts/powermyself.com/httpdocs/pub/...
1
vote
1answer
24 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} ^...
0
votes
1answer
112 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. ...
0
votes
0answers
53 views

Remove Duplicate admin URL in Magento 2

Hi I have stuck using magento 2 where I want remove duplicate admin in the URL,this my url : https://example.com/admin/admin/system_config/edit/section/web/key/a986525f4db93c0abcda3b1d1cbb3/ and I ...
0
votes
1answer
43 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
0answers
43 views

How to make forbidden access to .htaccess File in Magento 2?

If I call the .htaccess file in the browser e.g. https://www.mycompany.com/.htaccess, then it is getting downloaded. Is there a way to fix this? I added this block to my .htaccess file, but it does ...
0
votes
0answers
31 views

magento 1 set htaccess file to enable multiple stores on localhost

i have three localhost stores that all exist off the same magento: http://localhost/storeone -default/main store http://localhoststoreTwo - (this store is a folder within main default folder) ...
0
votes
1answer
340 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, ...
1
vote
0answers
22 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,...
0
votes
1answer
368 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 ...
4
votes
3answers
121 views

alias for login page as /accounts

We have a magento website on /store folder. Idea is, on root folder, index.php will have company website. /store folder will have magento folder. Idea is, www.example.com/account should load login ...
1
vote
1answer
54 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
0answers
825 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 ...
0
votes
2answers
172 views

Transferring magento website to sub domain gives 404 error but works fine on main domain

I have a magento (1.9.2.1) setup on a main domain ( www.mysite.com ) and now I want to transfer it from main domain to subdoamin like (sub.mysite.com). Changed app/etc/local.xml file details Cleared ...
0
votes
1answer
430 views

Magento 2.0.12, 404 error(whoops, our bad) on all pages except Home, after fresh installation

After doing a fresh installation of Magento 2.0.12. I am getting "whoops, our bad" page for all pages except the homepage(index). The homepage load fine but for all other pages/links , I m getting ...
1
vote
0answers
61 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
2answers
798 views

How can I add mod expires to htacess but still update site?

I am looking at ways of speeding up my Magento site. One way that comes up is to Leverage Browser Caching and Expires Headers. I found to add this to htaccess- <IfModule mod_expires.c> # ...
1
vote
1answer
6k views

Redirecting HTTP to HTTPS?

I've read into this quite a bit but can't seem to find a solution. I'm trying to set it so whenever someone visits a link for my site (and for whatever reason they don't include https it redirects to ...
2
votes
2answers
46 views

Magento Install issues

Hi I've installed Magento 2 in a directory : var/www/html/magento2 There seems to be two problems I'm experiencing: When I browse to http://....aws.com/ I can see contents of html folder and lists ...
2
votes
1answer
589 views

Magento Secure Magmi from unauthorized access using htaccess

I'm using below htaccess file to prevent unauthorized access to Magmi. /{root_path}/{magmi_dir}/.htaccess Order deny,allow Deny from all Allow from 127.0.0.1 202.131.115.180 xxx.xxx.xxx.xxx this ...
1
vote
1answer
431 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-...
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
1k views

Website URL Redirects using mod_rewrite in htaccess for Magento2.1 Bitnami LAMP Stack Not Working

I wanted to write redirect rules to remove index.php from incoming urls in htaccess.conf file(in my app folder) and replace it with the query params. I ensured my rewrite rule to be working perfectly ...
2
votes
2answers
6k views

Accidentally deleted .htaccess file inside pub/static folder

I accidentally deleted my .htaccess file. Before that I could just delete everything in the var and pub/static folder (except the .htaccess file of course) and just reload the page to see my CSS / ...
2
votes
2answers
319 views

Images not showing properly in email when site is password protected

My Magento development website is password protected through .htaccess and .htpasswd. I have a share via email feature in my website. On click of product share an email is sent with image of product. ...
0
votes
1answer
392 views

Magento - Multiple Store - 2 domains, but 2nd store is in a subfolder

I have 2 stores: domain.ca domain.com (Domain Alias to /usa subfolder) domain.ca is already working and online. I'm trying to add domain.com to as an additional store. I've setup the Admin part. ...
2
votes
1answer
73 views

How to rewrite a folder path

I need to create a redirect that will redirect from https://www.example.com/es to https://www.example.com/mx for all pages on my site. How would I go about that. Can I do that in Magento admin section?...
2
votes
0answers
70 views

Magento 1.7 redirecting URLs when URL rewrite table empty and non in htaccess?

Im just cleaning up my site and sorting out all the 404s in webmaster tools. To fix the 404s I was just putting in a manual 301 in the htaccess file like this. Redirect 301 /football-rebounders/spot-...
1
vote
1answer
423 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://...
0
votes
1answer
23 views

Force Trailling slash and problem with pop up

Hi I have found this code about the trailling slash and it works perfect. Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_URI} [A-Z] RewriteRule (.*) ${lc:$1} [L,R=301] ...
0
votes
1answer
585 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 ...
2
votes
0answers
554 views

How can I perform 301 url redirection in Magento 2.0?

URL structure has been changed for one of product page in my Magento 2.0 webstore. Now I need to perform 301 redirection to newly created URL. Is .htaccess still helpful here? If yes then please ...
0
votes
0answers
18 views

Magento move through shell - after move index.php needed in urls

Strange issue, I do a backup of folder and database through shell. I setup the new test shop in a subfolder, change the url etc. All good. Cleared cache, did a reindex. Weird issue, after the move ...
0
votes
0answers
1k views

Font from origin as been blocked from loading by Cross-Origin Resource Sharing policy on multiple websites magento

I have created two websites using one magento installation, like: abc.com (original) xyz.com (second domain) Both are working fine except the fonts issue I got on sub domain (second website). Error ...
0
votes
1answer
59 views

Magento MultiStore Rewrite rules does not works

I have this code in .htaccess RewriteCond %{HTTP_HOST} www\.fashionstudio\.ie [NC] RewriteRule .* - [E=MAGE_RUN_CODE:default] RewriteCond %{HTTP_HOST} www\.fashionstudio\.ie [NC] RewriteRule .* - [E=...
1
vote
1answer
37 views

how can i change all urls of old website

i just remove my website from hmsaver.com to homemarket.ae now every thing is working but i want to ask is that possible if any visitor came from google to hmsaver.com and he redirect with same url to ...
0
votes
1answer
273 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 .... ...
1
vote
1answer
966 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
votes
1answer
88 views

magento website url is make a short [duplicate]

I wanted to make a short URL possible ? my hosting server :bluehost domain :different company to godomall ex) http://www.example.com/magento/index.php -> http://www.example.com/ or http://...
1
vote
2answers
804 views

Magento htaccess frontend authentication

Is it possible to block just frontend with htaccess? If I setup normal htaccess authentication to root then it block uploading images from admin. I'm aware there is IP blocking possibility but ...
0
votes
1answer
287 views

Parse error INDEX.PHP for sub-directory

I have created new web site for language code with sub-directory and copying two files index.php and .htacess from the root to the individual sub-directory.Then edit index.php file as: define('...
1
vote
1answer
912 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 ...
0
votes
0answers
45 views

Redirect magento site

I need to redirect the whole website to a specific url i.e to domain.com/customer/account/create. using htaccess? How I can do that. I tried the following stuff it it show redirection loop ...
13
votes
6answers
33k views

Local installation of Magento 2 doest not generate files in the pub/static folder

I've just installed Magento 2 Community Edition with sample data (downloaded from their website and not installed with composer) locally via MAMP. The installation process was succesful, but all files ...