Try the Demo

Magento Forum

   
Page 3 of 3
How do I remove “index.php” in url? 
 
matt7
Jr. Member
 
Total Posts:  2
Joined:  2011-02-13
 

Question for you all-

If I remove the index.php will it redirect all old URL links to the new addresses?

Thanks!
Matt

smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
shiwak224
Member
 
Total Posts:  41
Joined:  2011-03-23
 

HI,
You guys are just complcating things to remove index.php..
Just go to Search engine optimization and your problem is solved.. no ned to work out with .htaccess file and all..

 Signature 

| klarinet | kitare

 
Magento Community Magento Community
Magento Community
Magento Community
 
benh777
Jr. Member
 
Total Posts:  30
Joined:  2009-07-31
 

It works for me when selecting ‘Yes’ in:
System > Config > Web > SEO

But when I add the index.php to a url of my store in a broswer address bar, that still comes up too.

Would we need a 301 redirect to stop the possibility of search engine duplicate content, or need to add something to robots.txt?

I’m new to this side of things!

Thanks,
Ben

 Signature 

Home and Garden Centre, from the UK

 
Magento Community Magento Community
Magento Community
Magento Community
 
kevhead
Jr. Member
 
Total Posts:  1
Joined:  2012-01-10
 
Sindre|ProperHost - 05 November 2008 08:21 AM

That might be the problem. Try to enable url rewrites and see if that solves it. You need mod_rewrite enabled on your server.

How do you enable mod_rewrite on your server?

Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
isaacp
Jr. Member
 
Total Posts:  13
Joined:  2012-03-15
 

i tried this (without changing .htaccess) and it worked great but now i get a “not found” on my checkout page which is secure.

 
Magento Community Magento Community
Magento Community
Magento Community
 
magemaster
Jr. Member
 
Total Posts:  28
Joined:  2011-08-16
 

same Problem. I tried all the sayed things but if I edit the default file in /etc/apache2/sites-available then I got an 500 Interner Server error
So I must take AllowOverwrite None ... have anybody some Ideas ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
simoneweb
Jr. Member
 
Total Posts:  1
Joined:  2012-08-10
 

Hey guys,

I had the same problem after installation of a custom template.
First of all I needed to edit all .htaccess files commenting (with #) all the “Option” directives, because my hosting doesn’t support it.
I also added RewriteBase /.
However the thing that did the work for me was enabling the rewrite from the CP.
By the way, I wasn’t able to enable it from CP, so I directly went to database and I found the row “web/seo/use_rewrites” inside the table “core_config_data”.
Just changed the value from “0” to “1” and everything worked fine.

 
Magento Community Magento Community
Magento Community
Magento Community
 
shyam_saraswat
Jr. Member
 
Total Posts:  2
Joined:  2011-10-11
 

If you want to access your magento URL without index.php

for example:

http://domain.com/index.php/category

to

http://domain.com/category

then use the following steps

1) Make sure Apache rewrites are enabled: sudo a2enmod rewrite
2) This is the big one…I had to change my Apache config (/etc/apache2/sites-available/default) where it references AllowOverride None to AllowOverride All

3 Restart Apache (service apache2 restart)

4) Login to admin section by using the URL

http://domain.com/index.php/admin

5) then go to “System >> Configuration >>Web >> Search Engines Optimization”
Use Web Server Rewrites : YES

6) Go to “System >> Configuration >>Web >>Secure”

Use secure URL Frontend: YES

7)Then create the .htaccess file under your the magento installed folder.

If the magento installed under document root ( /home/username/public_html) then add follogig rules into .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

and If the magento installed under /shop or directory then add the following rules into ” /home/username/public_html/shop/.htaccess ” file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shop/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /shop/index.php [L]
</IfModule>

DONE!

 
Magento Community Magento Community
Magento Community
Magento Community
 
save_willy
Jr. Member
 
Total Posts:  8
Joined:  2012-09-07
 

shyam_saraswat, you’re a magician!
I did have trouble with all the stuff here, but in the end - it’s working!!! can’t thank you enough!

 
Magento Community Magento Community
Magento Community
Magento Community
 
misero
Member
 
Avatar
Total Posts:  48
Joined:  2011-01-19
 
shyam_saraswat - 12 September 2012 01:53 AM

If you want to access your magento URL without index.php

5) then go to “System >> Configuration >>Web >> Search Engines Optimization”
Use Web Server Rewrites : YES

6) Go to “System >> Configuration >>Web >>Secure”

Use secure URL Frontend: YES

7)Then create the .htaccess file under your the magento installed folder.

If the magento installed under document root ( /home/username/public_html) then add follogig rules into .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

DONE!

Works fine for me with Magento 1.6.2.0.
Thanks! wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
mansontech
Jr. Member
 
Total Posts:  6
Joined:  2012-10-19
 

for me it works too!
thanks!

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

I think, it is more easy to solve using the extension for work with SEO. Try this Advanced SEO Suite http://mirasvit.com/magento-extensions/advanced-seo-suite.html

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 3 of 3