Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Right, I know this isn't to do with PHP but I'm using it in conjunction with PHP and i figured those who give help in this forum would know about it (and i didn't know where else to put it).

    I have a .htaccess file in my root directory on my computer, on my apache server.

    It's just .htaccess which I open in notepad.

    But nothing's working... I printed off a bunch of stuff, including the thing i originally wanted to do (an articles about the urls from index.php?id=45 to /2005/07/13 etc) but I can't be helped.

    I've tried a line in the file for a redirect:

    redirect /about http://localhost/journal

    Just to see if it worked, and it didn't.

    So I tried to do:

    ErrorDocument 404 /404.php

    But that didn't work either.

    I have no idea what I'm doing wrong, and sorry if I'm being really vague but I don't know much about it - and reading all this material i printed doesn't help.

    Can anybody help?

    Ta very much
    tekp :cheeky: tekponline.com

  2.  

  3. #2
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Do you have "AllowOverride All" in your <Directory> for your webroot?
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  4. #3
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Nope, it's on

    AllowOverride None

    And I tried putting gibberish in the file but nothing happened still (i.e. it didn't display a 500 Internal Server Error).

    Any ideas?
    tekp :cheeky: tekponline.com

  5. #4
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Erm...

    Does it have to be on AllowOverride All or None?

    By the by, when I put 'gibberish' (something along the lines of "weliudfhwedkjsbn") in my httpd.conf file, there's no error on my site.

    I'm using PHPGeek's PHPTriad, if that's any more helpful?

    Edit!

    Got it working now, no worries I changed AllowOverride (the one not in the <directory> thing) to All and it worked.

    Thanks for trying to help

    Second Edit (A Little More Grim)

    I've tried to use the mod_rewrite extension (running Apache 1.3). I put this:

    RewriteEngine on

    ... in my htaccess and got a 505 internal server error. So I checked the error log and it said it wasn't recognised etc, maybe the command was mis-spelt or the module isn't there etc.

    So I checked the /modules/ directory and sure enough, mod_rewrite.co was sitting there comfortably. I checked the httpd.conf file and again, LoadModule rewrite module mod_rewrite was there and so was AddModule mod_rewrite. But they had a hash before them on the line. I figured this might be 'commented out' so I 'uncommented' it, but it still said the same thing in the error log.

    And the htaccess file itself is definately working because I did a 404 redirect with success.

    Any ideas? Thank you.
    tekp :cheeky: tekponline.com

  6. #5
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    Might be a stupid question but you did restart Apache after uncommenting the lines in the httpd.conf I assume?

    Sean

  7. #6
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    That is a stupid question, with a damned stupid answer.

    No I didn't, I'll try that tonight *looks shameful*

    <lame excuse>I'm fairly new to Apache by the way</lame excuse>
    tekp :cheeky: tekponline.com

  8. #7
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Ok I tried it, and the RewriteEngine on works, but now when I try and put this after it:

    PHP Code:
    RewriteRule !\.(gif|jpg|png|css)$ /includes/forward.inc.php 
    It continuously loads in the browser, never stopping, endless-loop style.

    I'm running Apache 1.3 which is in c:\apache, and my root directory is c:\apache\htdocs.

    Am I doing something wrong?
    tekp :cheeky: tekponline.com

  9. #8
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    I don't know what I'm doing wrong because I followed an article at Alistapart: http://www.alistapart.com/articles/succeed/.

    (The bit here is under 'The Index Takes It All', about 3/8 of the way down.)

    Someone else on another forum suggested that it was because all the requests were being sent to forward.inc.php, including the one being sent to forward.inc.php, so it was an endless loop.

    But I don't know why it didn't do this for Till Quack (article author), and it hasn't got a comments page for that particular article.

    If nobody here can help, would anyone suggest e-mailing the author?
    tekp :cheeky: tekponline.com


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:46 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com