简体   繁体   中英

Not able to Expand category after code for redirect in htaccess in Magento

I have already set yes for 'Web Server Rewrites' at System->Configuration->Web->Search Engine Optimization for my Magento site. It's working for SEO friendly urls fine without index.php in url, but if URL entered manually with index.php then it does not redirect the URL removing the index.php and for this I added these 2 lines in .htaccess files as:

RewriteCond %{THE_REQUEST} ^[AZ]{3,}\\s/+index.php(/[^\\s\\?]+)? [NC]

RewriteRule ^ %1/ [L,R=301]`

And after this it removes the index.php from manually entered URLs as well. So, this issue get solved.

But now I am facing the issue in back-end. I am not able to expand the category and some time I am not able to login in admin.

Please suggest solution ASAP .

I got this solution and I put the code below in .htaccess and got resolved my issue.

RewriteRule ^(.*)(index.php/admin)($|/) - [L]
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.example.com/$1 [R=301,L]
RewriteRule ^index.php/(.*) $1 [R=301,QSA,L]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM