Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5982059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:01:57+00:00 2026-05-22T22:01:57+00:00

Im have absolutely no experience with .htaccess and i tried something today. I basicly

  • 0

Im have absolutely no experience with .htaccess and i tried something today. I basicly wanted all my pages starting with http://www. to redirect to http://

so i did a search on the internet and found this link :

http://forum.joomla.org/viewtopic.php?p=2437275

again i had absolutely no idea what i was doing and i just copy pasted this

RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteRule ^(.*) http://example.com/$1 [L,R=301]

into a .htaccess file in my public_html directory

i tested going into a http://www site but nothing happened, so i just deleted everything in the .htaccess file as it was in the beginning, totally bank.

so i tested this

# Redirect to www
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

and then this:

# Redirect to non-www
RewriteCond %{HTTP_HOST} !^(example\.com)?$
RewriteRule (.*) http://example.com/$1 [R=301,L]

just like the article says

But now a few hours later i notice something really strange. One of my ajax calls from jquery takes like 1 minute to complete.. Is there anything i can do to undo this? Its almost like something does an infinite loop like the article says. And i have no idea what to do.

Everything works on localhost..

Regards,
Alexander

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:01:58+00:00Added an answer on May 22, 2026 at 10:01 pm

    You have to have

    RewriteEngine on
    

    At the beginning of your file.

    This may be obvious but since you have no experience, just in case, you have to replace example.com with your domain name.

    Be sure you actually have and Apache server.

    Be sure to name your file “.htaccess” (with the dot, without the “”)

    So, this should work:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
    RewriteRule ^(.*) http://example.com/$1 [L,R=301]
    

    I really doubt what you did on the .htaccess could slow down the AJAX call, check to see if the .htaccess is now empty, if it is, it will not affect it for sure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an absolutely positioned div containing several children, one of which is a
I have quite a few years experience of developing PHP web applications, and have
I am responsible for porting a Delphi 2007 application to C# and have absolutely
I have absolutely no idea what I'm doing wrong right now. I think I'm
Rails somehow mixes my locales an I have absolutely no clue why. Most of
I am trying to learn WebGL from absolutely no experience with OpenGL or OpenGL
I have absoulutely no experience with regular expressions, so I've run into a small
I have the following css code: #Layer3 { position:absolute; width: 89%; height: 40%; left:
I have an image(a map) with some points of interest placed using position: absolute
I'm using php and I have the following code to convert an absolute path

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.