Remove index.php from Joomla URL’s

Remove index.php from Joomla URL’s

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 (update: In Joomla! 2.5.7, Erik’s step 2. 2. should be “Use URL rewriting”. There is an exclamation icon next to this option. Hover over it to see important instructions like changing the htaccess before clicking on Yes and saving. Thanks Shane Brenizer
  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 / (update: In Joomla! 3.0, you don’t need to take off the ‘#’ sign from htaccess. Just rename the htaccess.txt file to ‘.htaccess’ Thanks Raihan)
    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.

Blog photo by Needoptic

Erik Rostad
erik@eprcreations.com

Erik Rostad started EPR Creations in May 2008. He works with universities, international organizations, and executives on their online presence.

157 Comments
  • Remove index.php from Joomla URL's | EPR Creations LLC « php
    Posted at 02:11h, 25 April Reply

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

  • MarkSpizer
    Posted at 03:49h, 03 May Reply

    great post as usual!

  • Brian
    Posted at 17:47h, 06 May Reply

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

    Thank You.

    Brian

  • Don Knowlton
    Posted at 15:15h, 14 May Reply

    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!

  • Dawn Smith
    Posted at 13:17h, 20 May Reply

    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.

    • Erik Rostad
      Posted at 13:36h, 20 May Reply

      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.

  • Dawn Smith
    Posted at 10:54h, 23 May Reply

    Hey Erik:

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

    • Erik Rostad
      Posted at 17:57h, 23 May Reply

      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.

  • ssoso
    Posted at 13:43h, 24 May Reply

    finally … great post and thank you

  • Ravi
    Posted at 09:40h, 17 August Reply

    This is great post and help me to solve URL problem

  • Alex
    Posted at 11:05h, 20 October Reply

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

  • Erik Rostad
    Posted at 15:11h, 20 October Reply

    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.

  • Julia
    Posted at 21:39h, 25 October Reply

    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! =)

  • Houssam Ballout
    Posted at 15:18h, 13 February Reply

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

  • Erik Rostad
    Posted at 18:03h, 13 February Reply

    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.

  • kurian
    Posted at 07:10h, 21 February Reply

    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.

  • Erik Rostad
    Posted at 08:34h, 21 February Reply

    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

  • kurian
    Posted at 05:29h, 23 February Reply

    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

  • Erik Rostad
    Posted at 07:24h, 23 February Reply

    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/

  • kurian
    Posted at 04:17h, 24 February Reply

    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

  • Mark Ford
    Posted at 17:06h, 24 February Reply

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

    Thanks SOOOOOOOOOOOO much for posting this!!

    Mark

  • adrian
    Posted at 13:55h, 22 March Reply

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

  • Filipe
    Posted at 12:13h, 24 February Reply

    Thank you master 😀 You save my work

  • Dannysam
    Posted at 15:59h, 26 April Reply

    Thanks a ton, this has been very helpful, was beating my head against removing the index.php, finally got it done with your suggestion

    Thanks again.

  • Mariaria
    Posted at 16:00h, 30 April Reply

    Thank you so much. I spent hours trying to figure this out (I have no idea what I’m doing) and you made it crystal clear.

  • Richard
    Posted at 05:15h, 11 May Reply

    How does this work for joomla 2.5 and my root folder is on my computer and the htaccess is not listed as a txt file

    • Erik Rostad
      Posted at 06:53h, 11 May Reply

      Hi Richard, you may need to choose “view hidden files” in your root folder in order to view the htaccess file. I know that some FTP clients will only show the htaccess file if that option is chosen. What FTP client are you using?

  • edw
    Posted at 05:02h, 16 May Reply

    you saved me!!!!
    thanksss!!!

  • Shonda G
    Posted at 19:42h, 01 June Reply

    Well, shucks. It will not let me change the file name from htaccess.txt to .htaaccess because it says the file already exist. I did remove the # from within the file even without the change. index.php still there. suggestions? In the process of finishing up the re-build of our site now so it is largely under construction as far as content as we migrate over to Joomla. http://www.AbundantJourneys.com. Really appreciate your article.

    • Erik Rostad
      Posted at 22:01h, 01 June Reply

      It looks like you got it working. But if not, let me know what you are using to view the .htaccess file. Sometimes you need to choose an option to show hidden files to be able to see the .htaccess file. Once you do that, you can either edit the existing .htaccess file or delete it and replace it with the htaccess.txt file.

  • Tony
    Posted at 09:35h, 04 June Reply

    dude you are a life saver…..Thanks for sharing!!!!!!

  • Naveed
    Posted at 15:33h, 07 June Reply
  • Bijo
    Posted at 23:42h, 10 June Reply

    Hi Erik,
    I have same issue as Kurian’s .
    Can you please advise how the the issue was resolved.
    Or should I need to contact you?

    Am using Joomla! 2.5.4
    Thanks

  • Brenden
    Posted at 20:00h, 01 July Reply

    Great tips! I’m having some issues though. I have two options which I have enabled:

    – Search Engine Friendly URLsYesNo
    – Use URL rewriting

    I renamed my htacces.txt to .htaccess.

    When I mouse-over my links they look perfect. i.e. “http://localhost/mysite/pricing” but when I select the link it leaps me direct to http://localhost/xampp/

    Any clues what might be causing it?

  • Brenden
    Posted at 20:12h, 01 July Reply

    Ignore… silly user 🙂

  • Nitin
    Posted at 11:11h, 02 July Reply

    thank you !! done for my site without any issue 🙂

  • ganesh
    Posted at 03:14h, 04 July Reply

    thank you Erik Rostad, you are a genius, it helped me in joomla 2.5

    Regards
    Ganesh

  • Sarah
    Posted at 16:27h, 10 July Reply

    Perfect. Thanks so much for sharing.

  • Tom Fink
    Posted at 21:02h, 11 July Reply

    It worked for me except now how do I get an administrator login? It ignores the /administrator/index.php that I used to get the admin login screen….it may be simple but I have not figured it out yet. Thanks in advance

  • JoomTeach
    Posted at 15:32h, 16 July Reply

    Great tips. it help me joomla 2.5.

  • JoomTeach
    Posted at 03:17h, 18 July Reply

    Great tips. it help me joomla 2.5.JoomTech

  • Paul
    Posted at 15:43h, 23 July Reply

    Thanks for the the tip.. I have two sites in shared Linux hosted on go-daddy..

  • Ian
    Posted at 09:20h, 31 July Reply

    Hi. All has worked well, except for the home page. /index.php has been removed from all urls but I can only get to the home page by typing http://www.hampshire-garden-machinery.co.uk/index.php
    What am I missing?
    I’m using Joomla 2.5 installed in public_html folder, which is where the .htaccess file is.
    Thanks

  • Ian
    Posted at 05:06h, 01 August Reply

    Hi.
    Search Engine Friendly URLs is set to YES
    Use URL rewriting is set to YES
    Adds Suffix to URL is set to NO
    Unicode Aliases is set to NO
    Thanks.

    • Erik Rostad
      Posted at 06:47h, 01 August Reply

      And did you make the updates to the .htaccess file?

  • Christian
    Posted at 01:02h, 02 August Reply

    Awesome. You save my job!! This also removed index.php on all my images.
    Thank you.

  • Diego Abner''
    Posted at 18:35h, 07 August Reply

    Great Erik Rostad,
    You save my job… Rs
    Thank’s

    Regards!

  • Mari
    Posted at 21:09h, 07 August Reply

    Hi Erick,

    I have:
    SEO Settings
    Search Engine Friendly URLs Yes
    Use URL rewriting Yes
    Adds Suffix to URL Yes

    I changed the
    htaccess.txt file TO .htaccess.
    and removed the #
    the URLS now look great but when I click on each link the page is no longer there, I get

    Not Found
    The requested URL /viruemart-store/recreational.html was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    Apache Server at Port 80

    • Erik Rostad
      Posted at 07:27h, 08 August Reply

      Hi Mari – you shouldn’t have .html at the end of your files as these are not html files within Joomla. Can you try to open the page without the .html at the end of the URL?

  • Cynthia Martín
    Posted at 22:38h, 07 August Reply

    Hi Erik,

    I already change the global configuration SEO Settings, Search Engine Friendly URLs and Use URL rewriting it´s ON

    Then i edit the htaccess.txt file (the name of the file and the line RewriteBase /) but when i ftp this file my website doesn´t work 🙁

    Can you help me to figure out what’s happening?

  • Cynthia Martín
    Posted at 23:14h, 07 August Reply

    Erik, i tried for third time and now works!!!! thank you so much

  • Rene Arndt
    Posted at 17:37h, 09 August Reply

    Hi Erik,

    I have a problem, pretty much the same as Mari, I set:

    SEO Settings
    Search Engine Friendly URLs Yes
    Use URL rewriting Yes
    Adds Suffix to URL Yes

    I changed the
    htaccess.txt file TO .htaccess.
    and removed the #

    But now my navigation bar is not working any more, I can still access my sites if I add the index.php in between my url and the page name.

    Any idea what I could have missed out on?

  • Rene Arndt
    Posted at 17:40h, 09 August Reply

    Never mind I just found my mistake, I added an extra “.” to .htaccess

    I thought it was part of the code but I just realise it was punctuation on your part.

    Thanks for the great help though!

  • Johnny B
    Posted at 18:41h, 04 September Reply

    Great Article!

    I have a question regarding the google indexation after this URL change.
    Let’s assume my websites were indexed by google like that:
    http://www.some-site.com/
    http://www.some-site.com/index.php/a

    Now, after the change, http://www.some-site.com/index.php/a but also http://www.some-site.com/a is accessible.
    Do I need to remove the URL http://www.some-site.com/index.php/a via the google webmaster tools or will google automatically remove http://www.some-site.com/index.php/a from the index?

    I hope it is precise and clear what i mean.
    Cheers

    • Erik Rostad
      Posted at 20:55h, 04 September Reply

      Hi Johnny, do you have a program automatically creating an XML Sitemap on your Joomla site? If so, these should be automatically updated and Google will notice the new URL in your updated XML sitemap file. If you don’t, look for a Google Sitemap add-on to include in your Joomla website.

  • Johnny B
    Posted at 18:46h, 04 September Reply

    Sorry for the double post.
    Well, apparently http://www.some-site.com/index.php/a is NOT accessible any more. It just was in my browsercache.
    So I guess I’ll just have to wait for google to reindex my site and change the URLs?

  • Johnny B
    Posted at 18:50h, 04 September Reply

    OMG!! I’m sorry.
    Please don’t pay attention to my second post. Both URLs are still accessible!

  • P Vinnys
    Posted at 13:40h, 11 September Reply

    I was scratching my head looking into the PHP code to do this. This tutorial let me keep my hair.. Thank you. I would assume Joomla would make this a bit easier. Nevermind they made everything else easy…..

  • jen
    Posted at 23:34h, 25 September Reply

    Not Found

    The requested URL /general-info/quick-facts.html was not found on this server.
    Whats the problem?i tried the steps but cant open my pages.please help,thanks.im on joomla2.5

    • Erik Rostad
      Posted at 06:48h, 26 September Reply

      Hello Jen – Joomla does not generate .html pages. Try using just /general-info/quick-facts/ at the end of your URL.

  • blackjack
    Posted at 04:52h, 01 October Reply

    Thanks a lot! This works great for me!

  • Christiaan
    Posted at 04:10h, 15 October Reply

    Cool thank you man! Much apppreciated
    http://www.cnmarketing.co.za

  • meny
    Posted at 16:34h, 21 October Reply

    TNX
    it works
    i could spend a lot of time for it.

  • Tess
    Posted at 15:27h, 26 October Reply

    Oh wow.. so simple 😉 Thanks for sharing!

  • Bluebeep
    Posted at 20:27h, 09 November Reply

    Wish it was this simple for me. I get a redirect loop showing: Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    All browsers behave just this way.

    There’s something we’re missing here.

    • Erik Rostad
      Posted at 08:37h, 10 November Reply

      Hello Bluebeep – can you please let me know what you added for each portion of the settings listed in this post? I haven’t come across anyone who entered a redirect loop yet after completing these tasks.

  • Kiera
    Posted at 16:50h, 10 November Reply

    Great article, totally what I wanted to find.

  • Nan
    Posted at 08:11h, 24 November Reply

    Thanks so much! This totally fixed my problem! I spent hours on this until the tech support guy at Hot Joomla Templates gave me a link to your article. So simple, but it had stopped me in my tracks!
    Thanks again!!

  • Thomas de Jong
    Posted at 16:19h, 28 November Reply

    Thanks!

    At first I could not get it to work, but after reading the .htaccess file I found the following lines below. By commenting out the “Options +FollowSymLinks” with putting a “#” in front of it, it worked nicely.

    # The line just below this section: ‘Options +FollowSymLinks’ may cause problems
    # with some server configurations. It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that dissallows changing it in
    # your .htaccess file. If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url’s. If they work,
    # it has been set by your server administrator and you do not need it set here.
    ##

    ## Can be commented out if causes errors, see notes above.
    Options +FollowSymLinks

  • Lidia
    Posted at 14:14h, 12 December Reply

    It’s not working for me and I don’t know what to do 🙁

    • Erik Rostad
      Posted at 17:15h, 12 December Reply

      Did the URL change at all? Did you do all of the steps listed?

  • Oscar
    Posted at 20:02h, 25 December Reply

    Thanks for that article!

  • vishnu
    Posted at 06:05h, 29 December Reply

    hi,
    i am getting URL for my articles like this

    http://www.thenandyal.com/videos/item/1091-shakuni-movie-online.html/videos
    i want like this
    http://www.thenandyal.com/videos/shakuni-movie-online
    what to do,to come like that,

    please help me

    • Erik Rostad
      Posted at 19:26h, 31 December Reply

      Have you renamed htaccess.txt to .htaccess?

  • Adeniji
    Posted at 07:42h, 08 January Reply

    Did not work for me
    It keeps redirecting me back to my_site/the menu name but opens in Wamp
    Pls help !

    • Erik Rostad
      Posted at 07:48h, 08 January Reply

      Hello Adeniji – what is the full URL so I can take a look?

  • Adeniji
    Posted at 15:08h, 08 January Reply

    Hello Erik, thanks for your swift response
    Though i have revert back to the original settings since i was finding it hard to get
    Here’s the link…http://demob.atlastechng.com/idcl
    also, what could cause some pages to have date like this (http://demob.atlastechng.com/idcl/index.php/2012-03-14-03-21-37/activation)
    Thanks for lending a helping hand, God bless you real Good !

  • Adeniji
    Posted at 03:41h, 09 January Reply

    I dont understand how to remove the date from url
    Can you help?
    Thanks

    • Erik Rostad
      Posted at 06:57h, 09 January Reply

      Hello Adeniji – can you let me know what part of the instructions where you got lost?

  • Adeniji
    Posted at 07:17h, 09 January Reply

    The Menu type alias is where am having issues
    I have turned on the SEF URLs in global configuration, yet am still getting the same error
    Its a phoca gallery component and some other pages
    Also, if u can look into the index.php removal of a thing or a better tut, i will appreciate it so much
    Thanks !

    • Erik Rostad
      Posted at 14:15h, 09 January Reply

      Were you able to make the updates to the .htaccess file I have written about in this post?

  • Adeniji
    Posted at 05:48h, 10 January Reply

    Yes i Made the changes to the .htaccess and also enable SEF url, so when ever i click on any menu, it gives me a 404 error page
    WHat else can be done?

  • Abrūsas
    Posted at 05:02h, 25 January Reply

    Thnak You very much!

  • Simon
    Posted at 10:52h, 02 February Reply

    Worked a dream for me, but matey above is correct with this line in the .htaccess file.

    ## Can be commented out if causes errors, see notes above.
    Options +FollowSymLinks

    Have to edit it to read

    ## Can be commented out if causes errors, see notes above.
    # Options +FollowSymLinks

    Don’t need to do this on all servers but its worth looking at if you get error pages.

    Thanks loads for your help 🙂

  • Russell
    Posted at 16:04h, 06 February Reply

    Hello,

    I’ve been racking my brains out getting this to work. I’ve got it to work on other sites, but this particular one is giving me a problem. Would it be because I need to restart the Apache service? I would really appreciate some help with this.

    • Erik Rostad
      Posted at 16:16h, 06 February Reply

      Hi Russell – can you advise the domain name? Have you completed all steps listed in this post?

  • Russell
    Posted at 08:30h, 07 February Reply

    I did follow all the steps.

  • Wouter S
    Posted at 09:13h, 13 February Reply

    Erik you are a hero. Without your help I could not have fixed this!!
    First I followed your steps, but the error remained showing up. So I contacted my webhost for their help, and it seems I had to synchronize my .htaccess (with the ‘#’ removed in this file) to their server with a special button on their site.
    After I did this, all my urls work proper. Thanks!

  • Shane Brenizer
    Posted at 09:21h, 13 February Reply

    In Joomla! 2.5.7, Erik’s step 2. 2. should be “Use URL rewriting”. There is an exclamation icon next to this option. Hover over it to see important instructions like changing the htaccess before clicking on Yes and saving. Thanks Erik for your help!

    • Erik Rostad
      Posted at 09:35h, 13 February Reply

      Thank you Shane – I have made this update in the post (and credited you as well).

  • K.O.D
    Posted at 11:15h, 15 February Reply

    I have tried everything possible i saw on the internet it does NOT work…Finally i give up 🙁 because i think its dependent on your theme or template being used. Current Setting

    URL rewriting = Yes
    Search Engine Friendly URLs = Yes
    Renamed htaccess to .htaccess
    Removed the “#” infront of RewriteBase /
    added a # before ‘Options +FollowSymLinks’

    i have tried everything Finally I Give up… Im tired of this whole thing 🙁

    • Erik Rostad
      Posted at 11:21h, 15 February Reply

      Hello KOD, have you looked through the comments to this blog? Many people have also had trouble after instituting the updates and so some additional options are suggested within these comments. Please take a look and see if any of those help out. Please let us know how it goes.

  • K.O.D
    Posted at 11:19h, 15 February Reply

    i am Honestly Heartbroken that i cant find a solution to this

  • Adeniji
    Posted at 11:41h, 15 February Reply

    Hello Erik, you have been doing a nice job. Please i’d suggest if anybody can upload the .htaccess they used for removing the index.php, It will save some people their jobs and stress.
    Just a suggestion because i have tried all solutions and they seems not working, am even tired but hate seeing the index.php on my clients site, please help !!!

    • Erik Rostad
      Posted at 15:39h, 15 February Reply

      Hello Adeniji – it’s just the .htaccess file that comes with the Joomla installation (http://www.joomla.org/download.html). On line #53 or around that area, there is a line that says:

      # RewriteBase /

      Just simply remove the # before the words by deleting it. That will leave RewriteBase / and will call the feature that removes /index.php/ from the URL.

  • Adeniji
    Posted at 02:55h, 18 February Reply

    I did that and it worked on the condition of a mouse over, when i refreshed, i had a 404 error page
    Am just tired of dis..
    Wish i could see an expert to put me through

  • Angelo
    Posted at 17:14h, 21 February Reply

    I have tried everything on here letter for letter. I can’t get it to work on another forum I found that if the site is hosted locally SEO wont work. Is this the case?

    Any guidance would be great.

    Thanks

    • Erik Rostad
      Posted at 22:06h, 21 February Reply

      Hi Angelo, not sure what to tell you there. Sorry.

  • Raihan
    Posted at 01:03h, 01 March Reply

    Wow! I spend nearly 6 hours behind that. At the end I asked to my hosting people. They even can’t solve. It’s so easy.
    Just to mention, for Joomla 3.0 – you don’t even need to take off ‘#’ sign from htaccess. Nothing at all inside htaccess.txt file, but rename it only as ‘.htaccess’. That’s it.
    Thanx a lot.

  • Tommy
    Posted at 11:42h, 03 March Reply

    I followed up your instruction but get error message Internal Server Error. I’m using wamp server on localhost.
    I changed these in the httpd.conf file of Apache*:

    Options FollowSymLinks
    *AllowOverride All
    Order deny,allow
    Deny from all

    • Erik Rostad
      Posted at 11:03h, 05 March Reply

      Hello Tommy – the wamp server might be your problem. Joomla is Linux-based and you appear to be using Windows hosting.

  • Al.
    Posted at 15:27h, 10 March Reply

    Hi, This method works great However, the pages connected to each tab wouldn’t display the content once completed the above instructions. I’m guessing it has something to do with renaming the links, can any body confirm this?

    Many thanks.

  • Russell
    Posted at 12:44h, 11 March Reply

    I followed the steps and index.php is gone, but none of my links to other pages work. Most notably in the top navigational menu. What’s the fix for this?

    • Erik Rostad
      Posted at 21:30h, 11 March Reply

      Hi Russell – what version of Joomla do you have installed for the website?

  • Adeniji
    Posted at 15:44h, 11 March Reply

    Hello Erik and Fellow Gurus in the house, please i really need your help in solving this issue. I have some List (li) items and i want the the drop down to align to the left for some elements and some should remain.
    Actually, this is the link http://www.atlastechng.com/demo/new/tellme/
    When u Hover the More, Opinion and Lifestyle Menu link, it aligns to the right and out of the page causing a lengthy stuff, i want only those 3 Menu List to align to the left when a mouse hovers on it.while others remain. I hope you guys understand me.I have come across a nth element in css somewhere but cant remember..
    Please guys, what can i do to achieve this? if u can also recommend me to another site, i will appreciate that as well.
    Hoping to read from you soonest !

  • Russell
    Posted at 09:27h, 13 March Reply

    I’m using 2.5.9

    • Erik Rostad
      Posted at 11:04h, 13 March Reply

      Hmm, not sure what to tell you Russell. I know with other CMS programs, once I make a change like that, I need to reset the permalinks or menu option so that the new menu URL’s are reset. I know many other people have followed the instructions listed above and everything has worked accordingly. You were able to make the update to the .htaccess file, correct?

  • Han Koster
    Posted at 10:30h, 13 March Reply

    I had no success with this tip, until I realized that my site was not in the root of the url.
    So I had to change the rewrite rule to:
    Rewritebase /sitefolder

  • Russell
    Posted at 11:37h, 13 March Reply

    Yes, I followed all the instructions and it works on all my other sites except for one. Maybe Han’s suggestion will work.

    • Erik Rostad
      Posted at 13:03h, 13 March Reply

      Ok – let us know how it goes. If that doesn’t work, let us know and we’ll see what else we can try. Also, since it is a University website, it could have something to do with the University’s server setup. I know I’ve worked on University sites in which the servers have functioned differently to what I was used to with other hosting options.

  • Tom
    Posted at 04:40h, 15 March Reply

    Tnx for the easy step by step solution 🙂 works very well 🙂

  • Gary
    Posted at 12:46h, 15 March Reply

    Thanks for all the tips Erik, but I still can’t get the url rewriting to work properly.

    I’ve taken all the measures listed, and the url rewriting works on the menu if I hover over it, but I get an error message:
    “Forbidden: You don’t have permission to access /index.php on this server.” on any page I try to access.

    If I manually insert index.php in the appropriate place, I can access the page/menu item.
    I figured that the menu links aren’t getting rewritten, and on the ‘Edit Menu Item’ page under Details, the page link is listed as index.php?option=com_content&view=article&id=xxxx

    Even if I create a new menu item, or copy the item, I still can’t access it from the menu, I get the same error message.

    Apparently the site is hosted on an Apache/2.4.4 (Unix) Server. I’m using Joomla 3.0.3.

    Is there anything else I can try? I have another site on (I think) the same server that is rewriting URLs just fine, but that’s running Joomla 2.5.8

  • Gary
    Posted at 09:36h, 16 March Reply

    Erik, thanks for your prompt reply. This was the first method I tried. I’m not sure how it differs from your method, it looks exactly the same to me.
    Essentially, I renamed htaccess.txt to .htaccess, then switched URL Rewriting and SEF URLs to YES.
    I’ve even removed the # before RewriteBase / even though it’s supposedly not necessary in Joomla 3.0.
    I asked my hosting provider, he told me not to use Joomla 3.x as it’s not stable. Which quite frankly is nonsense, unless Joomla broke something in the 3.0.3 release.
    This is an incredibly frustrating problem.

    • Erik Rostad
      Posted at 12:00h, 16 March Reply

      Hi Gary – yeah, I can’t help you with Joomla 3.0. I’ve pretty much moved everything over to WordPress so I am no longer using Joomla for my sites.

  • Burak
    Posted at 19:55h, 29 March Reply

    Hello I followed exactl the instruction and the url changes but when click some other menu site I got a 404 error. Can I do something else? I tried also to edit the .htaccess with different code but no solution. I habe a strato server and ai think I do have mod_rewrite. What can I do?

    • Erik Rostad
      Posted at 07:47h, 30 March Reply

      Hello Burak – what version of Joomla are you using?

  • Piseth
    Posted at 21:35h, 01 April Reply

    Very thank
    .
    Well done

    It most usefully.

  • Piseth
    Posted at 21:36h, 01 April Reply

    I use 2.5 it very good .

  • Duc Nguyen
    Posted at 11:26h, 02 April Reply

    Dear ERIK ROSTAD,
    Plese help me. I remove success index.php in URL. But when i access mydomain.com/index.php system not redirect domain.com.
    Please guide me write file htaccess.

    • Erik Rostad
      Posted at 11:53h, 02 April Reply

      Hi Duc – what version of Joomla are you using?

  • Abbie P
    Posted at 04:34h, 09 April Reply

    I am a newbie with Joomla and its been causing me a headache how to remove index.php until I came to your site. Thankyou so much for sharing this. works like a charm for me 🙂

  • Discognate
    Posted at 00:45h, 17 April Reply

    thank u loads, u dear good soul!

  • Seby
    Posted at 00:43h, 23 April Reply

    I have changed the file to .htaccess and it say server mismatch.. Below is my htaccess file. Kindly Check..

    ##
    # @package Joomla
    # @copyright Copyright (C) 2005 – 2013 Open Source Matters. All rights reserved.
    # @license GNU General Public License version 2 or later; see LICENSE.txt
    ##

    ##
    # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
    #
    # The line just below this section: ‘Options +FollowSymLinks’ may cause problems
    # with some server configurations. It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that dissallows changing it in
    # your .htaccess file. If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url’s. If they work,
    # it has been set by your server administrator and you do not need it set here.
    ##

    ## Can be commented out if causes errors, see notes above.
    Options +FollowSymLinks

    ## Mod_rewrite in use.

    RewriteEngine On

    ## Begin – Rewrite rules to block out some common exploits.
    # If you experience problems on your site block out the operations listed below
    # This attempts to block the most common type of exploit `attempts` to Joomla!
    #
    # Block out any script trying to base64_encode data within the URL.
    RewriteCond %{QUERY_STRING} base64_encode[^(]*([^)]*) [OR]
    # Block out any script that includes a tag in URL.
    RewriteCond %{QUERY_STRING} (|%3E) [NC,OR]
    # Block out any script trying to set a PHP GLOBALS variable via URL.
    RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
    # Block out any script trying to modify a _REQUEST variable via URL.
    RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
    # Return 403 Forbidden header and show the content of the root homepage
    RewriteRule .* index.php [F]
    #
    ## End – Rewrite rules to block out some common exploits.

    ## Begin – Custom redirects
    #
    # If you need to redirect some pages, or set a canonical non-www to
    # www redirect (or vice versa), place that code here. Ensure those
    # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
    #
    ## End – Custom redirects

    ##
    # Uncomment following line if your webserver’s URL
    # is not directly related to physical file paths.
    # Update Your Joomla! Directory (just / for root).
    ##

    RewriteBase / Floorit

    ## Begin – Joomla! core SEF Section.
    #
    RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    #
    # If the requested path and file is not /index.php and the request
    # has not already been internally rewritten to the index.php script
    RewriteCond %{REQUEST_URI} !^/index.php
    # and the request is for something within the component folder,
    # or for the site root, or for an extensionless URL, or the
    # requested URL ends with one of the listed extensions
    RewriteCond %{REQUEST_URI} /component/|(/[^.]*|.(php|html?|feed|pdf|vcf|raw))$ [NC]
    # and the requested path and file doesn’t directly match a physical file
    RewriteCond %{REQUEST_FILENAME} !-f
    # and the requested path and file doesn’t directly match a physical folder
    RewriteCond %{REQUEST_FILENAME} !-d
    # internally rewrite the request to the index.php script
    RewriteRule .* index.php [L]
    #
    ## End – Joomla! core SEF Section.

    • Erik Rostad
      Posted at 06:15h, 23 April Reply

      Hi Seby – what version of Joomla are you using?

  • Taner
    Posted at 05:38h, 02 May Reply

    Hi Im using joomla 3.1.1 and have a multi-language but am getting error 500 when I Use URL rewriting. Any ideas?

    • Erik Rostad
      Posted at 07:11h, 02 May Reply

      Hi Taner, no, sorry, don’t have any ideas. Just to verify – you did all of the steps listed in this post, correct? There is a note in the instructions that is specific to Joomla 3. Some things may have changed in Joomla 3+ since the writing of my post.

  • Nait
    Posted at 15:28h, 17 June Reply

    Works perfectly! Thank you!

  • Paul
    Posted at 12:58h, 08 July Reply

    This works great! Thanks much.

  • omarodoch
    Posted at 00:46h, 09 July Reply

    My god, thanks, you are truly a genius!

  • Joenineo
    Posted at 06:31h, 10 July Reply

    I had loads of problems using the simple steps of converting htaccess.txt to .htacccess, Internal server error 500, and found that I needed to install the rewrite mod in apache, then doing the simple steps it worked first time!!!

    Hope this helps someone

  • Rick
    Posted at 01:41h, 15 July Reply

    Thanks. Of all the sites I visited to solve this problem, you offered the most simple solution that actually worked.

  • Amid
    Posted at 06:00h, 19 July Reply

    It didn’t work for me. I had the name of the file changed in FTP and it disappeared. I also tried removing the # from the file and over-writing the missing file (which apparently went hidden) and my webpages (other than home) crashed. So i simply tried putting the index.php into the URL to see whether my pages were still functional on the index.php’s and surprise! They were there.

    I’m using Joomla 3.1. Looking forward to hear back from someone for a solution! That index.php is really not good looking.

    • Erik Rostad
      Posted at 06:50h, 19 July Reply

      Hello Amid, what FTP client are you using? You will need to choose an option to ‘View all Files’ in order to view the .htaccess file again. When you start off a file with a period (.hatacces), the file does not show unless you choose Show All Files. Please let me know if that works for you and allows you to get back into that file.

  • Roberto
    Posted at 19:04h, 25 July Reply

    Awesome!

  • Matt
    Posted at 16:10h, 28 July Reply

    Hi,
    I’ve tried this but I’m not seeing any difference… Anything else I need to check?

    Thanks
    Matt

    • Erik Rostad
      Posted at 16:24h, 28 July Reply

      Hi Matt – What version of Joomla are you using? Have a look at some of the comments below my blog post as many additional questions have also been answered there. Regards.

  • Debbra
    Posted at 12:46h, 10 October Reply

    I almost never leave comments, but after reading through a few of the comments on
    Remove index.php from Joomla URL

  • Aracelis
    Posted at 19:03h, 18 October Reply

    This article is truly a nice one it helps new the web visitors who are wishing for blogging.

  • Brenna
    Posted at 03:01h, 23 October Reply

    This is really the 4th article, of your site I personally read.
    Nonetheless I personally enjoy this particular 1, “Remove index.
    php from Joomla URL

  • Olimpia
    Posted at 18:33h, 19 January Reply

    Thank you! I’ve spent so much time to change it too.. until I’ve found your site and solution! THANKS!

  • lina
    Posted at 15:34h, 21 January Reply

    Amazing! Thanks!!!

  • Roman
    Posted at 03:35h, 01 March Reply

    Hi,
    i am using the latest joomla 3.x
    I changed htaccess.txt to .htaccess.txt
    I enabled Use URL rewriting in global config in admin panel.

    Now, I can see that it removed index.php from url but now it wont show me the sites – I am getting errors all the time:

    Not Found
    The requested URL /component/users/ was not found on this server.

    • Erik Rostad
      Posted at 08:14h, 01 March Reply

      Hi Roman, you need to change .htaccess.txt to .htaccess without the.txt. Did you do that?

  • Roman
    Posted at 10:00h, 01 March Reply

    Hi Erik,

    Yes, I tryed that but when I do that I get this error:

    Internal Server Error

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

    Please contact the server administrator, support@one.com 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.

  • Roman
    Posted at 10:02h, 01 March Reply

    ok i found it out. Its working now!

    solution is rename to .htaccess (without .txt)
    and comment that line!

    I had to comment this line with #
    #Options +FollowSymLinks

  • Teo
    Posted at 07:48h, 31 July Reply

    Thanks!

  • cyo
    Posted at 08:53h, 20 August Reply

    In the root folder, when I try to rename the htaccess.text file to .htaccess, it tells me the file already exists.

    • Erik Rostad
      Posted at 09:26h, 20 August Reply

      Hello Cyo – ok, are you able to view your current .htaccess file to see what is in it?

  • Daniel
    Posted at 07:02h, 12 October Reply

    Thanks a lot man.It worked for me.

Post A Comment