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 1 of 3
How to remove index.php from URL
 
jammyjc
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2008-01-06
 

How do i edit the .htaccess file to remove index.php from of my URLs so instead of getting this - http://www.domain.com/INDEX.PHP/category
i get this - http://www.domain.com/category

Cheers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mayerwin
Sr. Member
 
Avatar
Total Posts:  182
Joined:  2008-01-15
France
 

I guess you should use apache url_rewrite, but be careful!

 
Magento Community Magento Community
Magento Community
Magento Community
 
blockhead
Jr. Member
 
Total Posts:  20
Joined:  2008-05-12
 

yah how do i do the apache rewrite. kinda need some details about it like a working code.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ODB
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-02-06
London
 

I enabled URL rewrites in the admin and the index.php no longer shows up in the frontend.

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-05-06
 

Me too.

Windows XAMPP installation. Magento 1.1 Beta.

System/Configuration/Web: Use Web Server Rewrites YES.

It worked for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
elmacm
Jr. Member
 
Total Posts:  1
Joined:  2008-05-12
 

I fix it:

http://mysite.com/index.php/category by http://mysite.com/category

go to :
1) System
2) Configuration
3) Web:
secure:
Use secure URL Frontend: YES

4) edit:
http://mysite.com/.htaccess

############################################
## you can put here your magento root folder
## path relative to web root

RewriteBase /

############################################

 
Magento Community Magento Community
Magento Community
Magento Community
 
bmcinnis
Jr. Member
 
Total Posts:  6
Joined:  2008-07-28
Columbus, Oh
 

I tried AddictDownload.com’s solution and made it 1/2 way there…

1.) Set “Use secure URL Frontend: YES”

2.) Set the RewriteBase / like above.

I also have “Use Web Server Rewrites: YES” in Admin>confinguration>web

The links still show up as http://magento.YOURDOMAIN.com/index.php/living-room/living-room-accessories BUT....if I remove the index.php from the URL I just mentioned, it works as well.  So, this URL works as well http://magento.YOURDOMAIN.com/living-room/living-room-accessories.

The problem is all the links throughout the site still have the “index.php” in them.  Any ideas on how I get the links throughout the site to NOT include “index.php”.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michal_s
Sr. Member
 
Total Posts:  111
Joined:  2008-05-15
The Netherlands
 

AddictDownload.com; thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
mygeek911
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2008-05-30
 

Thanks AddictDownload.com. The .htaccess addition of

RewriteBase /

worked like a charm!
 
Magento Community Magento Community
Magento Community
Magento Community
 
TheHuntingDynasty
Jr. Member
 
Total Posts:  25
Joined:  2008-06-27
 

I tried AddictDownload.com’s solution and made it 1/2 way there…

1.) Set “Use secure URL Frontend: YES”

2.) Set the RewriteBase / like above.

I also have “Use Web Server Rewrites: YES” in Admin>confinguration>web

I did all that but STILL can;t get my site working without /index.php/ after my root and before my category.

I\m going to dump the whole thing after thre months of fiddling and go to Zen Cart if I can;t get this sorted. ANyone got any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
sebastian123
Jr. Member
 
Total Posts:  5
Joined:  2008-10-17
 

well the same happened to me… any solutions??

 
Magento Community Magento Community
Magento Community
Magento Community
 
websitebob
Member
 
Total Posts:  33
Joined:  2008-04-16
 

Hi all.

Looking to reopen this URL rewrite problem....

My site is using PHP 5.2.6 and I’m also unable to remove index.php following these steps.

Is it possible that the htaccess Rewrite codes may be different under PHP 5.2.6?

Braniac solutions are greatly appreciated.

Thanks in advance
websitebob

 
Magento Community Magento Community
Magento Community
Magento Community
 
mart3ndo
Jr. Member
 
Total Posts:  13
Joined:  2008-08-14
 

I take it i’m the only one that actually prefers the index.php being there. One question though, will enabling URL rewrites make my shop any faster?

Thanks,

Martyn

 
Magento Community Magento Community
Magento Community
Magento Community
 
kiatng
Enthusiast
 
Total Posts:  875
Joined:  2008-09-03
Kuala Lumpur, Malaysia
 

URL rewrites requires the AllowOveride directive be set to All in order for apache 2 to load .htaccess, which takes time, and so will make a shop slower, in theory anyway. But it doesn’t seem to make noticeable difference to me with the rewrite on or off.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kiatng
Enthusiast
 
Total Posts:  875
Joined:  2008-09-03
Kuala Lumpur, Malaysia
 

More information on removing index.php from the URL is available in this thread http://www.magentocommerce.com/boards/viewthread/22199/

 
Magento Community Magento Community
Magento Community
Magento Community
 
jguiss
Member
 
Avatar
Total Posts:  75
Joined:  2007-11-30
France / Avignon
 

Thanks a lot Addict Download for this : RewriteBase /
It solved my issue

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