Remove index.php from Joomla URL’s

Blogon April 25th, 201022 Comments

I spent hours trying to figure this out and thought I would write about the solution.  When turning on Search Engine Friendly URL’s in Joomla, they begin adding an extra index.php within the URL’s so that it looks something like this – http://www.yoursite.com/index.php/category/article.

I want the URL to be http://www.yoursite.com/category/article.

It’s cleaner and better for the search engines.

So, here are the steps I took to remove the unnecessary index.php:

  1. Go to the Global Configuration area within your Joomla admin.
  2. Under SEO Settings, click YES for the following two items:
    1. Search Engine Friendly URLs
    2. Use Apache mod_rewrite
  3. Now, go to your htaccess.txt file at the root of your site and rename the file .htaccess.
  4. Use some sort of text editor (I use text wrangler) to remove the ‘#’ before the words ‘RewriteBase /
    1. For me, this was around line 53 of the .htaccess file.
  5. Now, try to navigate around your Joomla website.  The index.php should be gone.

Related posts:

  1. Setting up a 301 Redirect
  2. Remove Unused Files on your Mac
  3. Simple Email Capture for Joomla
  4. Check your website for Problems
  5. Can’t Copy Text from a PDF File

22 Responses to “Remove index.php from Joomla URL’s”

  1. Remove index.php from Joomla URL's | EPR Creations LLC « php says:

    [...] Pełny artykuł na: Remove index.php from Joomla URL's | EPR Creations LLC [...]

  2. MarkSpizer says:

    great post as usual!

  3. Brian says:

    WORKS!! a dream after trying other suggestions and the joomla forums nothing worked.

    Thank You.

    Brian

  4. Don Knowlton says:

    Fantastic! Thank you – btw, I had to change the line to

    RewriteBase /joomla

    as my site is still in a sub-folder – but, works perfectly!

  5. Dawn Smith says:

    I followed your intstructions to remove the index.php from my url. It shortened the url, but now states that the web page is not found. What can I do to fix this error?

    Thanks.

  6. Erik Rostad says:

    Hi Dawn – what are your current settings for
    – Use Apache mod_rewrites
    – Add suffix to URL

    Please let me know. That might have something to do with it.

  7. Dawn Smith says:

    Hey Erik:

    I have both the Apache mod_rewrites and add suffix to url both on yes.

  8. Erik Rostad says:

    Dawn, please send me an email with your site information so I can take a closer look. You can use the email on my contact page of this website.

  9. ssoso says:

    finally … great post and thank you

  10. Ravi says:

    This is great post and help me to solve URL problem

  11. Alex says:

    This does’t work on godaddy shared hosting. Does anyone know why? Thanks!

  12. Erik Rostad says:

    Alex – I couldn’t find any posts offering a definitive answer to your question regarding GoDaddy hosting. I have had other issues with GoDaddy hosting and different plugins in the past. I have always had really good luck when I have called the GoDaddy help line. They are usually able to get you an answer or find someone who can help you.

    If they tell you nothing can be done, your other options are to move to dedicated hosting or to a different hosting company.

    Sorry I couldn’t be of more help.

  13. Julia says:

    Hi Erik! Could y help me? This does’t work for me… I have done everything… I don´t know what is wrong.. can y help me? The site is http://www.verx.com.br
    Tks! regards from BrasiL! =)

  14. Houssam Ballout says:

    I had did that on my Joomla 1.6, but it didn’t work..
    Any Suggestions?

  15. Erik Rostad says:

    Hello Houssam,

    I think what you will need to do is to download this extension:

    http://dev.anything-digital.com/Blog/Application-Development/give-your-site-a-seo-kickstart-with-sh404sef.html

    Then, follow these instructions:

    http://forum.joomla.org/viewtopic.php?f=34&t=278999#p1288476

    I believe I had to do this on one site I worked on.

    Please let me know if that works for you.

  16. kurian says:

    I followed your instructions to remove the index.php from my url. It shortened the url, but now states that the web page is not found. What can I do to fix this error?

    I m using joomla 1.6

    Thanks.

  17. Erik Rostad says:

    Hello Kurian – what are your current settings for:

    – Use Apache mod_rewrites
    – Add suffix to URL

    If that doesn’t work, then you will likely need to download this extension:

    http://dev.anything-digital.com/Blog/Application-Development/give-your-site-a-seo-kickstart-with-sh404sef.html

    Then, follow these instructions:

    http://forum.joomla.org/viewtopic.php?f=34&t=278999#p1288476

  18. kurian says:

    Hi Erik,

    These are my settings:

    Use Apache mod_rewrites: yes
    – Add suffix to URL:yes

    when i check on local host , everything work fine but when i move on server side this error has occured.

    “Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.”

    plz help
    Thanx

  19. Erik Rostad says:

    Hello Kurian,

    If you’d like to send me you login & FTP access info, I can take a closer look. Please use the contact info on this page to send your access information:

    http://www.eprcreations.com/contact/

  20. kurian says:

    Thanx Erik for your response, I will send you as early as possible. My site is hosted on godaddy, is this a problem?

    plz reply

    Thanx

  21. Mark Ford says:

    Thanks man. YOU ROCK!!!!!!! I was going crazy trying to figure out what why that was happening!!!

    Thanks SOOOOOOOOOOOO much for posting this!!

    Mark

  22. adrian says:

    This issue has been causing me major headaches with my hosting company. Thank you for posting this fix it seems to be working great.

Leave a Reply