SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    348
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mod_rewrite failing on Heart Internet

    Hi guys,

    Having a bit of trouble with my .htaccess file on Heart Internet hosting - the identical htaccess file runs no problem on the other two hosts I use plus on my local machine.

    I just want to route every request that's not for an existing file to site.php. This is what I generally use:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .? site.php [L,QSA]

    But on Heart Internet I get a weird message: "The requested URL /home/sites/[domain name removed]/public_html/site.php was not found on this server."

    A Google search has uncovered the following (similar mod_rewrite problems on Heart Internet):

    http://www.fearofmice.co.uk/blog/ind...&c=1&tb=1&pb=1

    http://www.andrewgoodricke.com/2008/...eart-internet/

    (I'm not using Code Igniter by the way, just a regular PHP web app but I doubt it matters as this is at the server level)

    I've tried the solutions in the links but they don't work either.

    Can anyone help??

    Many many thanks in advance!

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

    Do you have a site.php file in your DocumentRoot? If you do, then the 404 is the error.

    I'm not a Heart Internet user but I'd suspect that they have crippled either your .htaccess or mod_rewrite. The ONLY thing you can do is to contact your support with them to ask about that.

    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

  3. #3
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    348
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi David, thanks for the answer. Yes, I had the site.php in the root folder!

    Everything seems to be working now, apparently it was because my domain hadn't properly propagated itself across their system, though I'm not sure why would that make a difference since I was using the temporary URL anyway.

    Thanks again!


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
  •