Stack Exchange Network

Stack Exchange network consists of 174 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
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [htaccess]

Denotes questions related to htaccess. A .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, used for configuration of site-access issues, such as URL redirection, URL shortening, Access-security control (for different webpages and files), and more.

0
votes
2answers
77 views
+100

Rewrite URL using GET params

I have a URL that looks like this: site.local/wheel-tyres/tyres.html?find=aprilia-af-1-futura-1989-4729&sid=T80yDaUX1a I'm trying to get it to look like this: site.local/wheel-tyres/tyres/...
0
votes
0answers
12 views

Magento 2.2.2 - Restrict access to Admin and redirect to 404 if unautohrized

I need to allow specific IP's/IP range as authorized users to access Magento admin area and redirect to 404 page not found if an unauthorized IP try to access http://store.com/admin. Could think of ...
0
votes
0answers
19 views

Access Magento Admin on Subdomain

I have a running store on Magento 2 which has multiple websites that I can access in the front end without any problems, for example: https://siteone.mymagestore.com https://sitetwo.mymagestore.com ...
-1
votes
2answers
173 views

Magento 2.2.x 500 internal server error upon installation

I have just installed magento 2.2.4 on my cPanel and I got internal server error 500. I tried to rename .htaccess file but then it opens with no css and its admin gives 404 error. My cPanel uses PHP 7....
0
votes
1answer
32 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
49 views

1.9 - Setting up multi-website using subdomain

So I'm attempting to setup a second website under Magento, and I'd like it to be on a subdomain, for example, second.mywebsite.com. My main store is mywebsite.com. I've essentially got everything ...
0
votes
1answer
39 views

No Forward Slash on URL redirects back to Homepage

We've got a strange issue with a Magento 1.9 install where any page that you try and navigate to that doesn't have a slash on the end of the URL is automatically redirect back to the homepage. Our ...
0
votes
1answer
45 views

Apache 404 Error for url redirect for files in pub static folder

I am having problem with my setup in local and live, when I try to hit a url that dd not exist in : pub/static/frontend/XXX/default/ folder it gives me apache 404 error. I have my alias or domain ...
-1
votes
0answers
12 views

one too many “slashes” on carousell product

in the carousel of products on the homepage there is one too much slash. I give an example, block "Best Seller" in home, the product has the link: https://example.com/ENG//prodotto-di-test-1.html ...
2
votes
1answer
42 views

Same Magento 2 htaccess file but different results on local machine and live server

I am running Magento 2.1.14 and have a version installed on my local machine as well as a live server. Both machines are running Apache 2.2. On my local machine I installed php 7.0.31 and on the ...
2
votes
2answers
58 views

How to restrict direct access `/pub` with url?

How to restrict direct access /pub with the project URL (www.domain.com/pub) in Magento 2.
0
votes
0answers
23 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) ...
2
votes
1answer
49 views

WordPress installation under subdirectory all pages except gives 404

I have a Magento installation in base directory and WordPress installation in my sub directory. When I open the home page of WordPress it opens normally but when I go to any sub-page/post of WordPress ...
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
0answers
21 views

Issue with base URL Magento 1

I have a Project with an issue and I still haven't found the solution, maybe someone can help me. The same issue happens in Linux and Mac, the layout is broken and inspecting the code is possible to ...
0
votes
1answer
22 views

301 htacces doesnt work on Magento 2

I place my code at the top of htacces, but it doesn't work. What did i do wrong? # Redirect [CODE] [OLD PATH] [NEW PATH] RewriteEngine On Redirect 301 /sieraden /dames/dames-accessoires.html page: ...
1
vote
2answers
69 views

How to host downloadable ZIP file?

I have a ZIP file. I want it so when a user clicks a link on a page, it will download the ZIP file. I have the ZIP under pub/media/downloadable and inside there's a .htaccess file, and currently this ...
0
votes
0answers
51 views

Using dynamic php page with .htaccess rewrite on Magento

I am trying to setup a php page which queries a mysql db for my blogs using the url like "blog/my-story-blog". I would like to use the .htaccess to do this as I have done before on my other sites but ...
1
vote
5answers
350 views

How to remove index.php from url if we enter manually

How to remove index.php when we enter manually in the URL My store path is /var/www/html/testfolder/ Thanks
0
votes
1answer
596 views

How to remove trailing slash from Magento 2 url

I have installed ssl in my Magento 2 store and configured base url to the https version. But when accessing http version, Magento redirecting url with appending trailing slash. For example: My ...
0
votes
0answers
24 views

Prevent Magento 2.2 Admin page from redirecting with htaccess rewrites for multistore?

We have a multisite Magento 2.2 installation where only logged in users have access to the subfolder site2. example.com example.com/site2 I posted about setting up the htaccess rewrites here: ...
0
votes
0answers
33 views

XML sitemap redirects to HTML sitemap after change

I have a strange issue where when you visit www.website.com/sitemap.xml or www.website.ca/sitemap.xml, it shows the sitemap as an html page. The following has been added to my .htaccess : #Sitemap: ...
0
votes
1answer
441 views

magento 2.2 .htaccess issue

I am just migrating my site from wwww.example.com to www.example.com/demo. Now problem is that css is not loading and any url does not work. Please let me know if any issue in .htaccess. ############...
0
votes
0answers
564 views

Accessible Index Page is Configured wrong

Regarding the abc.co beta site we have in test, I did a SEO scan and was told The Accessible Index Page is Configured wrong. Search engines see your https://www.abc.co and https://www.abc.co/index....
0
votes
1answer
212 views

401 unauthorized due to directory protection on magento 2 project

Is there a way to pass basic authorization and bearer authorization in postman for accessing Magento 2 rest api's. I have defined the directory protection using .htaccess and .htpassword. For getting ...
0
votes
1answer
235 views

How to secure Magento 2 dev site using .htaccess

Previously using Magento 1 I have been able to secure dev sites easily using a .htaccess / .htpasswd setup. It's just to keep the site from being viewed before it's ready. However the same setup in ...
0
votes
1answer
120 views

Help for redirect all default page magento to 404 or homepage with .htaccess

I'am on magento 1.9.3.8, i know it would be time for me to go on magento 2... So i have this url by default in magento : downloader/ catalogsearch/advanced/ catalog/seo_sitemap/product/ catalog/...
0
votes
0answers
16 views

How to remove multiple 301 redirection via htaccess?

I have configured SSL on the website. I want to add 301 redirections if the URL hit in the browser with the below variation: http://www.example.com/ http://www.example.com http://example.com http:/...
0
votes
2answers
1k views

How to add 301 redirection rule magento2?

How to add 301 redirections for the base URL in Magento 2.1 via .htaccess. http://www.example.com/ http://www.example.com http://example.com http://example.com/ https://example.com http://...
0
votes
0answers
250 views

Magento 2.2.3 500 Server Error before setup

I have uploaded Magento 2.2.3 to my server, and before I do the setup or the installation it's giving me 500 Internal Server Error, I tried some fixes but only one worked, I modified the htaccess file ...
0
votes
0answers
35 views

Url Redirection- http & www to https Non-www [duplicate]

The website boheco.org is not redirected from www to non-www Any Suggestion. Htaccess Code is not working <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off ...
0
votes
1answer
293 views

Leverage browser caching magento 1.9 Not Working Htacess

My Website is https://boheco.org/ .Its displaying "Leverage browser caching" at https://developers.google.com/speed/pagespeed/insights. We already added code to the htaccess but it is not working.' ...
1
vote
1answer
23 views

google search result error after removing store name

I have developed an e-commerce site using Magento 1.9. And it is working very fine. But the problem is when the site was live google crawled all the pages and products with the store name such as ......
0
votes
0answers
212 views

Magento product redirect remove the query string from a URL

For my Magento 1.9.1 project, I want to implement affiliate tracking. For affiliate tracking I will add a querystring to Magento URL. It's Working good for all the URL except product URL. Whenever I ...
0
votes
0answers
44 views

Error load with JS file

When I load page I also load some JS file, but I have a X-Content-Type-Options nosniff and my file didn't run, because it is read as text file. Content-Type text/html; charset=UTF-8 In my ....
0
votes
0answers
30 views

After redirection body part is not displaying

From the website, URL redirection is working fine. But when we open in incognito window URL is redirected but body part is not displayed URL https://boheco.org/products/handlooms/lavender-diamond-60-...
1
vote
1answer
208 views

Domain redirection in htaccess not working

I have changed domain on the Magento store, however I need to still keep old domain urls accessible and redirected to new domain urls. for example. old-domain.com/products should redirect to new-...
0
votes
0answers
12 views

Magento display old images that are referenced in CSS

I am keep seeing the old images that are referenced in CSS file. This image was changed more than two months ago. The only way to refresh the images is to open the store via incognito mode. I thought ...
0
votes
1answer
39 views

local project url redirected to live project (project url import issue)

I want to run my live project in localhost , I have downloaded my Magento2.0 project from live and in localhost I am using xampp server , I have done this things many times , my all necessary commands ...
1
vote
2answers
2k views

Magento 2: Apache mod version not enabled/installed/allowed by host, causes 500 error on all pages due to failing .htaccess files

I created a fresh install of Magento 2.2.2 on a debian server using php7.1 and mysql 5.7. Once files were extracted, I was unable to access the setup wizard and received 500 errors from all pages. ...
1
vote
1answer
1k views

htaccess file on Magento director not working

I need to remove index.php from Magento website url. I have checked https://stackoverflow.com/questions/10474740/how-to-remove-index-php-from-urls. I have followed the same instruction and ...
3
votes
2answers
217 views

How to create wild card sub domain in Magento 1.9.x

I am coming with question of how to create a wildcard subdomain in Magento 1.9.x without using store view. I know creating more store view will cause the issues in price indexing, flat tables, etc., ...
0
votes
2answers
58 views

Is it possible to Manage .htacess file from Admin Panel?

Is there any way I can edit and update .htaccess file from admin panel of Magento. I'm using Magento 1.9
4
votes
2answers
859 views

How to secure Magento version control systems

Magento version control systems such as Git and Subversion store their metadata in hidden folders. Someone access my directory and mail me. I think I am not protecting my GIT. can anyone tell me how ...
1
vote
1answer
24 views

Add second store to magento 1.8

I'm trying to add a second store to my existing Magento installation (1.8.1.0). The existing instance sits on https://subdomain1.url.com, Within Magento, website code is base, store view code is ...
2
votes
2answers
83 views

How can I hide directory listing for hacker

My site build with Magento 1.9.3.4. someone sends me a mail with an attached image which is my listed directory. My question is how they fetch this. Did any setting to avoid this type of access.
0
votes
1answer
309 views

Magento2.2 default storeview error store id not found

I have created 2 store views in magento latest 2.2 I have enabled add store view to url in settings. But on home page it throws error store id not found. If I add en/ at the end of url or ar/ at ...
3
votes
2answers
47 views

How to rewrite magento website to new domain

I have magento website in custom.com domain, and now I want to access complete frontend website content from one more domain also says custom1.com. Admin url will be same as custom.com/admin. I have ...
0
votes
0answers
154 views

htaccess Rewrite Rules for Magento Multisite with WordPress blog

I have a Magento installation running 2 websites: www.mywebsite1.co.uk www.mywebsite2.co.uk We had a blog extension that was used, however now we've switch the blog on mywebsite1.co.uk to WordPress. ...
0
votes
1answer
563 views

Using htaccess to redirect baseurl with index.php

I have 1.9.3.6 magento installed with sample data. The backend works fine, but the frontend breaks with any links. I'm running it with apache through localhost. Base URL: http://127.0.0.1/magento ...