4

I have the following settings:

Use Web Server Rewrites => Yes

In htaccess I have RewriteBase /

Caching is disabled.

In one of my email templates I use <a href='{{store url="doc/toc.pdf"}}'>xxxx</a>

This results in /index.php/doc/toc.pdf/

How do I remove the /index.php part?

The links in the rest of the store do not show index.php in the url.

I also have this when using Mage:getUrl in a .phtml file

1
  • Have you tried ../doc and /doc Commented Feb 21, 2013 at 12:54

2 Answers 2

13

I found this solution somewhere which works for me:

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);

this returns:

http://mydomain.com/ so index.php is removed from the url.

And in a template I now use this:

{{config path="web/unsecure/base_url"}}doc/toc.pdf

which also returns the url without index.php

Sign up to request clarification or add additional context in comments.

1 Comment

Is it recommended way?
0

Try adding this into your .htaccess file.

RewriteRule .* /index.php [L]

Remember to clear your cache.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.