Remove index.php from Joomla URL’s

Coding
Categories: Productivity Tools
160 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 (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.

160 Comments. Leave new

  • Remove index.php from Joomla URL's | EPR Creations LLC « php
    April 25, 2010 2:11 am

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

    Reply
  • great post as usual!

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

    Thank You.

    Brian

    Reply
  • Don Knowlton
    May 14, 2010 3:15 pm

    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!

    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.

    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.

      Reply
  • Hey Erik:

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

    Reply
  • finally … great post and thank you

    Reply
  • This is great post and help me to solve URL problem

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

    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.

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

    Reply
  • Houssam Ballout
    February 13, 2011 3:18 pm

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

    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.

    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.

    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

    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

    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:

    https://www.eprcreations.com/contact/

    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

    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

    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.

    Reply
  • Thank you master 😀 You save my work

    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.

    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.

    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

    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?

      Reply
  • you saved me!!!!
    thanksss!!!

    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.

    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.

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

    Reply
  • 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

    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?

    Reply
  • Ignore… silly user 🙂

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

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

    Regards
    Ganesh

    Reply
  • Perfect. Thanks so much for sharing.

    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

    Reply
  • Great tips. it help me joomla 2.5.

    Reply
  • Great tips. it help me joomla 2.5.JoomTech

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

    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

    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.

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

    Reply
  • Diego Abner''
    August 7, 2012 6:35 pm

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

    Regards!

    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

    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?

      Reply
  • Cynthia Martín
    August 7, 2012 10:38 pm

    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?

    Reply
  • Cynthia Martín
    August 7, 2012 11:14 pm

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

    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?

    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!

    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

    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.

      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?

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

    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…..

    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

    Reply
  • Thanks a lot! This works great for me!

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

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

    Reply
  • Oh wow.. so simple 😉 Thanks for sharing!

    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.

    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.

      Reply
  • Great article, totally what I wanted to find.

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

    Reply
  • Thomas de Jong
    November 28, 2012 4:19 pm

    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

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

    Reply
  • Thanks for that article!

    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

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

    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 !

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

    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 !

    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?

    Reply
  • Thnak You very much!

    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 🙂

    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.

    Reply
  • I did follow all the steps.

    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!

    Reply
  • Shane Brenizer
    February 13, 2013 9:21 am

    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!

    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 🙁

    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.

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

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

    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.

      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

    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

    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.

    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

    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.

    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?

    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 !

    Reply
  • I’m using 2.5.9

    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?

      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

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

    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.

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

    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

    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.

    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?

    Reply
  • Very thank
    .
    Well done

    It most usefully.

    Reply
  • I use 2.5 it very good .

    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.

    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 🙂

    Reply
  • thank u loads, u dear good soul!

    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.

    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?

    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.

      Reply
  • Works perfectly! Thank you!

    Reply
  • This works great! Thanks much.

    Reply
  • My god, thanks, you are truly a genius!

    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

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

    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.

    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.

      Reply
  • Awesome!

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

    Thanks
    Matt

    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.

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

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

    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

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

    Reply
  • Amazing! Thanks!!!

    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.

    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, [email protected] 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.

    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

    Reply
  • Thanks!

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

    Reply
  • Thanks a lot man.It worked for me.

    Reply
  • So cool!! Worked like a charm and looks so much better in url address window. Thanks much for taking the time to write this up.

    Reply
  • Hi Eric,

    I tried this, and the problem I have is that whatever link you clicked on, it would always take you back to the homepage. Any advice?

    Reply
    • Strange – I’m sorry, but I haven’t used Joomla in over 5 years, so I’m not sure where to even point you for a fix. I’d have thought they’d have this fixed by now.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

How to Add & Adjust an Image in Microsoft Word
Colors