Questions tagged [.htaccess]

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

Filter by
Sorted by
Tagged with
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 ...
1
vote
2answers
1k 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 ...
2
votes
3answers
5k views

How to resolve .htaccess not working on localhost? [closed]

I copy all files of my website for to run it on my PC, but when I want to see pages it doesn't work and show me the phpinfo(). I have .htaccess in root and this is the code of it but it doesn't work ...
0
votes
0answers
2k 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 ...
1
vote
2answers
2k views

Magento REST API / Apache and “Content-Type header is empty”

Has anyone noticed this error message "Content-Type header is empty" when POST-ing to Magento REST API? I'm using Postman for testing and very-very surely I'm sending the Content-Type header along ...
1
vote
1answer
57 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
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 ...
0
votes
2answers
255 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
553 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
1answer
497 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
3answers
2k views

Magento HTACCESS query 301 redirect all but admin

Hi hopefully someone can help. I have added a 301 redirect to change from an old domain name to a new domain. The magento build is still on the old domain also (but with no follow / no index) I ...
0
votes
1answer
72 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=...
2
votes
4answers
10k views

Remove parent categories from subcategory URLs

I realise similar questions have been posed before, but I have an additional caveat when I ask the following question. How can Magento URLs be rewritten such that: http://www.example.com/category/...
1
vote
0answers
70 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 ...
0
votes
1answer
458 views

How to remove index.php in product view page?

For some reason i kept index.php in url but i want to remove index.php in Product individual page only. My current url : https://domain.com/index.php/category-names/product-name.html i want to this ...
1
vote
2answers
1k 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> # ...
2
votes
2answers
47 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 ...
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
2k 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 ...
3
votes
2answers
9k 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 / ...
0
votes
1answer
446 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
2answers
388 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. ...
2
votes
1answer
95 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
88 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
459 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
24 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
699 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
566 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
19 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 ...
1
vote
2answers
621 views

404 error magento

Hello everybody, I have just moved my magentoshop from localhost to a online server. I did everything you need to do like changing url in database and clear cache. Now i have a internal server error. ...
1
vote
1answer
42 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
375 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 .... ...
7
votes
1answer
270 views

Magento Duplicate Content Issue .htaccess rewrite 301 forwarding

i have some issues with duplicate content on my website. in the past i had diverse stores setup and i disabled them but the urls seem to exist still. i would like to set up a forwarding rule example: ...
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
votes
1answer
91 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://...
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
0answers
46 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 ...
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
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
144 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 ...
0
votes
2answers
165 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 ...
3
votes
2answers
5k views

htaccess redirect https to http except specific pages

I want to redirect https to http for almost all pages, except for checkout, cart and account. Especially to improve speed. How do I define that inside my htaccess? All my rewrite rules in htaccess: ...
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: ...
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 ...
0
votes
1answer
289 views

Want to remove index.php from the URL

Hi My site name is xpressbuyer.com. I have tried almost all solution, but nothing seems to be working. Below things i have done. Add code in .htaccess Set Use Web Server Rewrites to YES in Search ...
0
votes
3answers
460 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 ...
4
votes
0answers
80 views

Mobile browser is unable to load the XML data of Magento site [closed]

I am new to magento. My question here is that I am unable to load the XML data in mobile browser but with the same link i am able to display the xml data in Desktop browser . Data is coming out of ...
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
2answers
1k views

Htaccess - How can i make this redirect a 301 instead of 302?

My website redirects everything from http to https but 1 of the redirects is a none cacheable 302 redirect according to a few seo checkers i use. How can i get the following code to be a 301 redirect ...