1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Where to put the code to remove www from your URL?

Discussion in 'Styling and Customization Questions' started by Jericho M, Feb 25, 2014.

  1. Jericho M

    Jericho M Member

  2. Ernest L. Defoe

    Ernest L. Defoe Well-Known Member

    You would put that in your .htaccess file.
  3. Jericho M

    Jericho M Member

    There is .htaccess already in my xenforo root directory. You mean I will edit it and re-upload?

    Screenshot - 2_25_2014 , 10_56_38 AM.png
  4. Jeremy

    Jeremy Well-Known Member

    Yes, you will edit and reupload the file.
  5. Jericho M

    Jericho M Member

  6. touch

    touch Member

    hi, is this code also automatically redirect indexed link from google ?
    example ;
    indexed in google with this link : http://www.xenforo.com/community/threads/where-to-put-the-code-to-remove-www-from-your-url.69309/ , when clicked redirected automatically to : http://xenforo.com/community/threads/where-to-put-the-code-to-remove-www-from-your-url.69309/

    when I try similar code like this my visitor got 404 error page when accesing from google, but no error when they copy and paste the link manually ...
  7. Jericho M

    Jericho M Member


    I am not sure maybe @Jeremy can give you the right answer. My forum is really new so I don't have any link so far.
  8. Jericho M

    Jericho M Member

    Hi @Jeremy and @Ernest L. Defoe,

    Just want to confirm if I did the right things.

    I put the code before </IfModule> Is this correct?

    Screenshot - 3_8_2014 , 8_15_48 AM.png
    seojoseph likes this.
  9. seojoseph

    seojoseph Member

    Yes! Why? Because you're in the conditional for the apache mod_rewrite :)
    Jericho M likes this.
  10. Jericho M

    Jericho M Member

    Thank you for the confirm. :) Now I can proceed to re-uploading this and ready to welcome my naked url :D
  11. seojoseph

    seojoseph Member

    but I hope you noticed that you need to remove the duplicate RewriteEngine On for your addition to this file.. good luck and have fun!
    Jericho M likes this.

Share This Page