seo-settings-use-url-rewritingAs we continue to review the SEO settings in Joomla 3.0, the next option we get to is Use URL rewriting. In our testing, we noticed that when the Use URL rewriting option was enabled, index.php was removed from our URLs. In this tutorial we'll show you how to use this Use URL rewriting tool in Joomla 3.0.

 

To enable Use URL rewriting in Joomla 3.0:

  1. Log into your Joomla 3.0 dashboard
  2. In the left menu, click on the Global Configuration link under the SYSTEM heading
  3. There are several tabs at the top of the page. If you are not on the Site tab, click Site.
  4. On the right side of the page, find the Use URL rewriting option (see the screenshot at the top of the article). Adjust the setting to Yes / No, and then click Save in the top left menu.

    Please be sure to take note of the following:

    Select to use a server's rewrite engine to catch URLs that meet specific conditions and rewrite them as directed. Available for IIS 7 and Apache.
    Apache users only! - Rename htaccess.txt to .htaccess before activating.
    IIS 7 users only! - Rename web.config.txt to web.config and install IIS URL Rewrite Module before activating.

    This setting only takes effect if your set Search Engine Friendly URLs to Yes.

    You can see in the table below how Use URL rewriting affected one of our URLs:

    Use URL rewriting - YES
    http://domain.com/2-uncategorised/1-this-is-my-first-test-article
    Use URL rewriting - NO
    http://domain.com/index.php/2-uncategorised/1-this-is-my-first-test-article

     

Continued Education in Course 201: Joomla 3 SEO Settings
You are viewing Section 2: How to remove index.php from URLs in Joomla 3.1
Section 1: Using Search Engine Friendly URLs in Joomla 3.1
Section 3: How to add the .html suffix to the end of URLs in Joomla 3.1

Joomla Community Google+ Hangout #3

June 3rd, 2014

Thank you @RustyJoomla for letting me speak on the Joomla Community Google+ Hangout!

Click here to watch!

Support Center Login


Social Media Login

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-06-27 6:55 am

Hi

Thanks, it removed index.php

but there is a problem that i couldn't resolve:

after that, because in all urls were use index.php then it shows 404 error

 for example domain.com/contact couldn't be found  (because its real address in domain.com/index.php?contact)

Staff
24,266 Points
2014-06-27 9:19 am
Helli Nima,

To be sure, go ahead and clear your cache and test again. If it is still persistent, make sure you renamed the .htaccess file properly as advised in step 4. It is most often caused by this.

Kindest Regards,
Scott M
n/a Points
2014-07-01 7:03 pm

I have same problem:

running from home on ubuntu server 13.10, joomla 3.3.1, with PHP 5.5.3-1ubuntu2.3

I have done  the htaccess stuff, 000-sites-enabled and i think it could be an issue with apache and modrewrite itself.

Is there a noobsafe way/doc to figure it out for basic, simple rewrite (removing /index.php?) as i can not get my head around the apache docs :(

Staff
21,617 Points
2014-07-01 7:28 pm
Hello David,

I've been looking around and the best reference I could find on properly setting mod_rewrite can be found here. Take a look at the comments there as well the provided solutions and see if it doesn't provide you the information to properly set MOD_REWRITE.

Regards,
Arnel C.
n/a Points
2014-10-09 8:40 pm

Thanks, I tried for several tutorials and only its tip helped me.

n/a Points
2014-09-02 3:15 pm

I have the same problem. It removed the index.php from the URLs but after that I get 404 errors of all my pages.

I have a .htaccess file as well as a htaccess.txt file. 

The .htaccess file contains these lines

# Use PHP5.4 Single php.ini as default

AddHandler application/x-httpd-php54s .php

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www.yourfloor.net$ [NC]

RewriteRule ^(.*)$ http://www.yourfloor.net/$1 [L,R=301]

How do I rename htaccess.txt to .htacess so that the above codes are also present?

Thanks

Staff
21,617 Points
2014-09-02 4:19 pm
Hello Fredrick,

You should be able to use the file manager in cPanel to rename the file (you have to set it to show hidden files). You can then edit the .htaccess file and add/remove the code that you wish to add/remove. You can also manage files that are saved on your server.

I hope that helps to answer your question.

Regards,
Arnel C.
n/a Points
2014-10-13 4:45 pm
Via Google. It was great article!
n/a Points
2014-11-01 9:52 pm

Thank you very much... you saved my lot of time. 

 

thank u 

 

n/a Points
2015-01-16 9:53 am

i cant find my htaccess file after renaming it to .htaccess pls how can i get it back

Staff
21,617 Points
2015-01-16 2:22 pm
Hello Tom,

By default, any file with the "." in front of it is considered a "hidden" file. If you are using the cPanel file manager, then you will need to re-open it and select SHOW HIDDEN FILES. If you have somehow set that screen to not appear, then you will need to open cPanel and select Reset interface options at the very bottom of the screen. Once you are showing the hidden files, you'll be able to find your .htaccess file.

Regards,
Arnel C.
n/a Points
2015-03-04 12:10 pm

Hola, gracias por la publicación, he estado buscando por todos lados una solución, pero hay algo que falta y no me deja, renombre el archivo htaccess.txt a .htaccess, tilde en Usar la reescritura de URLs, mi versión de joomla es 3.2.3 es un servidor apache, php 5.5.21 con el modulo mod_rewrite cargado. Mil gracias por la ayuda!!! 

Staff
21,617 Points
2015-03-04 12:47 pm
Hello Pablo,

Apologies and we only provide support in English. However, if you are unable to change the .htacess file, then it's most likely a permission issue or the file already exists. You can EDIT the existing file and copy in the text from the .htaccess.txt file if you're trying to get that code to be active. That would probably the easiest way to handle the issue. If you are hosted with InMotion, provide us the domain name and we can make the change for you.

Regards,
Arnel C.
n/a Points
2015-03-23 11:58 am

NOTE!! The htaccess.txt must be renamed to .htaccess. DONT FORGET TO ADD THE . (Period) infront of htaccess. WAS: htaccess.txt TO: .htaccess I forgot the . infornt of the htaccess file name and I looked for hours on why it wasn't working. and....that was the little thing I got. NO need to do ANYTHING internally to the file. just that simple remane. And I didn't find the file in my CPanel, I had to use file zilla to get to it. 

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

16 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!