2

I useing Magmi to import/export products, but when I visit my Magmi subfolder (www.mysite.com/magmi/web/magmi.php) is allways redirect me to my homepage. If I rename - delete - move - turn off the magento main folder .htaccess file I can access to my Magmi subfolder. Can somebody help me please how I can visit the Magmi subfolder without turning of the main .htaccess file?

Marcell Nemeth
  • 97
  • 3
  • 4
  • 13

3 Answers3

4

Inside your Magento's .htaccess just after RewriteBase line add this rule:

RewriteRule ^magmi/ - [L,NC]

This will skip Magento's rewrite handling for /magmi/ URIs.

anubhava
  • 761,203
  • 64
  • 569
  • 643
  • Thanks your reply! I tried but is not working for me... The WWW.mysite.com/magmi/web/magmi.php link give me 404 error message, and the HTTP://mysite.com/magmi/web/magmi.php link redirect me to the frontpage... Can you tell me please please what is wrong? – Marcell Nemeth Apr 16 '13 at 14:36
  • You need to provide some details like your current directory structure? Whether magento is in DOCUMENT_ROOT or in a sub-dir? Where exactly is magmi installed? Also provide .htaccess file for both Magento and magmi in your question. – anubhava Apr 16 '13 at 14:43
  • It is in the document root like public_html/my-magento/ and the Magmi are installed in public_html/my-magento/magmi/. If I rename my main magento .htaccess file, after the magmi url visit is working... – Marcell Nemeth Apr 16 '13 at 15:12
  • ok thx, Pls provide .htaccess file for both Magento and magmi in your question. – anubhava Apr 16 '13 at 16:17
  • I have use the default magento .htacces file, magmi do not have any .htaccess file just my for protect their folder... – Marcell Nemeth Apr 17 '13 at 20:53
  • Just to verify I just downloaded and installed magmi with default Magento .htaccess and couldn't reproduce the problem. Most likely there is some other unwanted Rewrite rule is firing. Can you enable RewriteLog and post it with your question. – anubhava Apr 17 '13 at 21:01
  • I try your solution in other site (not in maganeto) and make a same problem... Allways redirect to homepage... Need rename .htaccess file to access to subfolder... – Marcell Nemeth Apr 19 '13 at 01:51
  • Since I couldn't reproduce the problem, I think it will be better if you post complete Magento's .htaccess by editing the question. – anubhava Apr 19 '13 at 05:52
3

Add this to your .htaccess file in the magmi folder:

ErrorDocument 401 "Unauthorized Access"

This way, the browser will ask for a user/password, instead of 404'ing. (See https://serverfault.com/questions/55323/disable-mod-rewrite-for-subdirectory)

Community
  • 1
  • 1
Barryvdh
  • 6,419
  • 2
  • 26
  • 23
2

in my case, the magmi folder had the wrong permissions. Try setting 755 permission on magmi folder and subfolders

igrossiter
  • 744
  • 1
  • 12
  • 26