Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 2
Magento path always contains “index.php” - How to get rid of it? 
 
tegarty
Jr. Member
 
Total Posts:  2
Joined:  2008-08-24
 

use this code in
.htaccess
.....................................................................................

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

...................................................................................

wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
imacache
Member
 
Total Posts:  35
Joined:  2009-04-23
Durango, CO
 

Here are the things I changed in my .htaccess file in order for web server rewrites to not break the catalog:

“RewriteRule . /index.php [L] “ NOT “RewriteRule ./ index.php [L]” This dumb typo seemed to fix everything.

Another thing I noticed:

“RewriteBase /site/from/root/” is commented out on the dude who posted his entire .htaccess file.  it looks like this, which makes it get ignored entirely:

#RewriteBase /doesntmatterwhatsherenow/”

Fixing the typo in the RewriteRule variable fixed everything for me (commenting out the rewrite base seemed to help too, it probably will if your magento directory isn’t at the root level of the web server like mine).  I have verified that everything on my site is functional with web server rewrites enabled now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
joaopaulogv
Jr. Member
 
Total Posts:  10
Joined:  2010-12-17
 

How I fix it:

Magento 1.5.1.0

1. use the default .htaccess
2. System / General / Web -> Seo Rewrite (yes)
3. Edit Virtual Host configuration. *On debian: vim /etc/apache2/sites-enabled/000-default
3.1 On <Directory /var/www/> change “AllowOverride None” to “AllowOverride All”
4. On Magento Admin: System / Index Management / Catalog URL Rewrites -> Reindex Data
5. System / Cache Management -> Flush Magento Cache and Flush Cache Storage
6. restart apache
7. be happy

 
Magento Community Magento Community
Magento Community
Magento Community
 
shogunv
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2012-04-25
 
Freddes - 09 March 2009 12:12 PM

Guys, enable rewrites in the gui and
in the .htaccess file you only need to change this:
RewriteRule .* index.php [L]
to:
RewriteRule . /index.php [L]


Hope this works for you. It did for me.... im using Magento version 1.2.1.1

This worked for me as well in Magento 1.7.0.2. I was constantly receiving 500 errors and 404 errors according to what I was trying to do. I deleted the old url rewrites (for my old site) and replaced the section prescribed above in my Magento .htaccess file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mirasvit
Guru
 
Avatar
Total Posts:  639
Joined:  2009-08-22
 

As a variant, you can try the ready SEO extensions . For example check this one http://mirasvit.com/magento-extensions/advanced-seo-suite.html Advansed Seo Suite.

 
Magento Community Magento Community
Magento Community
Magento Community
 
yldziner
Member
 
Total Posts:  52
Joined:  2008-04-20
 

## rewrite everything else to index.php

RewriteRule . /index.php [L]

</IfModule>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 2