SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Sep 2008
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple change not working: RewriteRule ^$ http://www.domain.com/

    I'm trying to change this:

    RewriteRule ^$ http://www.domain.com/home/

    ... to this:

    RewriteRule ^$ http://www.domain.com/

    ...but it gives me an error saying 'infinite loop'.

    What do I do? I bet this is simple.

  2. #2
    SitePoint Addict Phil-man's Avatar
    Join Date
    Nov 2000
    Posts
    291
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm totally not an expert on .htaccess (I came here with my own question on what is probably a simple problem), but to me an infinite loop suggests that you might have a .htaccess file in both the root directory and the /home/ directory and something in each one is trying to redirect/rewrite to the other.

  3. #3
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,604
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    js153,

    If you want help troubleshooting your code, you actually need to show us your code.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  4. #4
    SitePoint Addict
    Join Date
    Sep 2008
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found the answer, and I'm pretty certain you don't need to see any more code!

    Above I posted:
    Code:
    RewriteRule ^$ http://www.domain.com/
    ...and said it was telling me there was an infinite loop.

    It baffled me to start, but I'm sure I've figured it out now.

    That line of code redirects domain.com to domain.com. No wonder it came up with the error.

    Why do you need to see more code?

  5. #5
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,604
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    js153,

    If you think there is a problem and want help, then it's required in order to find your error. Nothing sinister about that at all. Members do that all the time although it's recommended they use www.example.com instead of their actual domain name (unless it's critical to the problem at hand).

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •