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

index.php missing from urls, no links work
 
hilbert54
Jr. Member
 
Total Posts:  29
Joined:  2009-05-04
 

Total newbie

Installed on a remote server in a sub directory, no problem.

Home page displays fine but none of the links work.

Address bar shows: mysite.com/magento/pagename

If I insert index.php/ before the page name then the page displays fine.

i.e. mysite.com/magento/index.php/pagename

This is the same for all links, i.e. both default footer links and my newly created categories and products.

None of these pages are actually in the magento directory btw.

Any help will be much appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NeilA
Moderator
 
Avatar
Total Posts:  1372
Joined:  2007-09-17
Blue Mountains, Oz
 

Sounds like you have something amiss with your URL rewrites and/or .htaccess…
I admit to not knowing a huge amount in this area, but in Admin > system > configuration > general > web what do you have selected under ‘Base URLS’ and ‘Use web server rewrites’?

 
Magento Community Magento Community
Magento Community
Magento Community
 
hilbert54
Jr. Member
 
Total Posts:  29
Joined:  2009-05-04
 

Thanks for the reply.

Base url: http://www.damsonjewellery.co.uk/magento/

Use webserver rewrites: Yes

I even need index.php in the address to access the admin.

I guess I could put index.php in the base url, but I don’t see that in the address of other magento sites.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hilbert54
Jr. Member
 
Total Posts:  29
Joined:  2009-05-04
 

I also should say that I cannot see the .htaccess file in the var directory.

It is not there in the original download, nor does it appear after installation.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NeilA
Moderator
 
Avatar
Total Posts:  1372
Joined:  2007-09-17
Blue Mountains, Oz
 

Do you have an htaccess file in the root (/magento)?
If not, that is your problem…

the ‘var’ directory htaccess file is just a very basic two line file, and not critical.

Can you see any htaccess files? It’s a hidden file so normally you need to turn on ‘view hidden files’ or the like in your FTP client.
With rewrites properly set up, you generally don ‘t see the ‘index.php’ in frontend urls, but you do in the admin…

 
Magento Community Magento Community
Magento Community
Magento Community
 
hilbert54
Jr. Member
 
Total Posts:  29
Joined:  2009-05-04
 

If I turn on show invisible files in my ftp client I see .DS_Store .htaccess and .htaccess.sample in the magento folder locally but they do not appear on the remote server.

I have found a function in my ftp preferences to upload hidden files and it was not selected.

Should I upload those files now or do they need to be written to at installation?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

Just upload the .htaccess file to the Magento root directory on your remote server. The installer does not write anything to the .htaccess, so the default one should work. You might have to edit the directive RewriteBase, though, if you have installed Magento in a subdirectory.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hilbert54
Jr. Member
 
Total Posts:  29
Joined:  2009-05-04
 

Thanks for that. Still so many questions.

I have uploaded the .htaccess file, I still cannot see it remotely even though I can see it locally.

It has made a difference though, any link now takes me to a page headed whoops, our bad...

Yes, I have installed to a subdirectory, so where/how do I edit the directive RewriteBase

Also should I upload the .DS_Store, .htaccess.sample to the root and the .htaccess that is in the var folder?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
NeilA
Moderator
 
Avatar
Total Posts:  1372
Joined:  2007-09-17
Blue Mountains, Oz
 

Weeelll, I reckon you could have a few bits and pieces missing if you had your FTP client misconfigured.
I would actually suggest a fresh install using the Magento Downloader to make sure you get everything there and in it’s place.

You don’t need the DS_Store folders - they are just silly Mac things… wink

Regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

hilbert54: To see the .htaccess file, you need to turn on ‘view hidden files’ in your FTP client. As for the 404 Not Found error, do you have the sample data installed? To make the frontpage links work you might have to refresh catalog rewrites. You can do so from the System -> Cache Management section of your Admin Panel.

The RewriteBase directive is set in your .htaccess. Just open the .htaccess file in a text editor and look for the line “#RewriteBase /magento/”. Replace ‘magento’ with the name of your subdirectory, and uncomment the directive by removing the ‘#’. Then save it and reupload to your server.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hilbert54
Jr. Member
 
Total Posts:  29
Joined:  2009-05-04
 

I originally did a full install of 1.3.1 I did not upload any sample data specifically.

Anyway your suggestions have been successful.

I have refreshed the catalog rewrites.

I have edited the .htaccess file as you indicated.

The links all work fine now.

I’m guessing the .htaccess would have been edited automatically during the install if it had been in place.

Is it likely that I have other problems to come because I initially installed without invisible files uploaded?

Many thanks to both of you for your help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

Great! Actually, the installer does not edit the .htaccess. You still would have had to manually edit the default one. You should not experience any other problems as the only ‘hidden’ file of importance is the .htaccess in the root directory.

Glad I could help smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
NeilA
Moderator
 
Avatar
Total Posts:  1372
Joined:  2007-09-17
Blue Mountains, Oz
 
Sindre|ProperHost - 16 May 2009 04:39 AM

Great! Actually, the installer does not edit the .htaccess. You still would have had to manually edit the default one. You should not experience any other problems as the only ‘hidden’ file of importance is the .htaccess in the root directory.

I’ve learned something there too (and I had forgotten about the catalog refresh....) wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
bridgingthegap2
Member
 
Total Posts:  43
Joined:  2009-03-07
 

Hi,

Wonder if you can help - I have index.php showing up in all my url’s - I didn’t think it would be a proble but google doesn’t like them.. I’ve attempted to do what’s been suggested above - but index.php still appears.

I have magento in the root - www.bridgingthegap2.com/ (so I don’t have a magento sub folder)

Any ideas how I can remove the index php..

Thanks in advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
bridgingthegap2
Member
 
Total Posts:  43
Joined:  2009-03-07
 

~No worries I’ve sorted not enabled the rewrites! thanks..

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ziga
Jr. Member
 
Total Posts:  4
Joined:  2010-07-09
 

Hi

I have the same exact problem with the index.php page.
I tried sorting it out by going the the Magento system settings and adding “index.php” to the base URL, but now everything is just plain text/HTML - there is no design on any of the pages whatsoever; not even a background.
And an even bigger problem I have now, is that it adds an additional “/index.php” to the URL when I try to go back to system settings (or pretty much any page, for that matter) and try to fix it or do some other stuff, so now the URL looks somehing like this:
http://localhost/magento/index.php/index.php/[rest of URL here]
What can I do to fix it?

I’m running the server on Ubuntu 10.04

Please keep in mind I’m a complete and utter newbie with Magento (this is my first-ever attempt at it).

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top