Forwarding and Forwarding Magento htaccess

On a Magento-based e-commerce site, I'm trying to remove index.php from URLs, as well as 301 redirect non-www to www.

Default URL: www.example.com/index.php/super-cool-product.html

Desired product URL: www.example.com/super-cool-product.html

Also 301 redirect non-www to www:
example.com/super-cool-product.html
at:
www.example.com/super-cool-product.html

Also like:
www.example.com/index.html
at:
www.example.com

This is what I have:

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301]

RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.rejuvahealth.com/$1 [R=301,NC,L]

RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.rejuvahealth.com/$1 [R=301,NC,L]
+3
source share
1 answer

In 301 redirect index.html:

Options +FollowSymLinks
RewriteEngine on
redirect 301 /index.html http://www.example.co.uk/

URL-, Magento www. .

index.php > > - "".

htaccess :

#RewriteBase /magento/

:

RewriteBase /

, Magento . , , - .

+3

All Articles