W
W
wegosi2014-08-22 23:22:13
htaccess
wegosi, 2014-08-22 23:22:13

How to redirect site.com/magento/index.php to site.com/ in .htaccess?

now this code is in the .htaccess root folder of the site

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{http_host} ^site.com [NC]
RewriteRule ^magento/(.+)$ http://www.site.com/$1 [R=301,L] 
RewriteCond %{HTTP_HOST}   ^(www\.)?site\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/magento(/.*)?$ [NC]
 RewriteRule ^(.*)$         /magento/$1    [QSA,L]

there is a magento subfolder in the root of the site, in which index.php is located, it is
necessary that when typing site.com/ in the browser, magento/index.php is not displayed
now index.php is removed, but the /magento subfolder remains.
How to fix it?
Thanks a lot

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Batishchev, 2014-10-03
@z0rg

Why such perversions? Place one level up.
Apache webserver or nginx? maybe the second one is why .htaccess doesn't work?!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question