Jump to content

Redirect 301 index.php to root


sleepyfrog

Recommended Posts

Does anyone now the .htaccess code to get www.store.com/index.php redirected to just www.store.com?

I know the one for non-www to www, but the ones I've tried for removing the basic index.php url either stop the CC4 SEF URL bit working (it shows the root path of the server) or it just makes every product/category link bump back to the home page.

Thanks

Link to comment
Share on other sites

  • 4 weeks later...

Guest Michael Cain

Does anyone now the .htaccess code to get www.store.com/index.php redirected to just www.store.com?

I know the one for non-www to www, but the ones I've tried for removing the basic index.php url either stop the CC4 SEF URL bit working (it shows the root path of the server) or it just makes every product/category link bump back to the home page.

Thanks

Try this - worked for me...

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/

RewriteRule ^index\.php$ http://www.yoursite.co.uk/ [R=301,L]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...