SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Feb 2001
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, I have implemented the 404 redirect trick for my PHP programs so that all my pages are indexable. However, when I tried to point my browser to http://www.domain.com/hw/15, I saw the URL is changed to the designated URL in the .htaccess.

    Here's what I have inside .htaccess:

    ErrorDocument 404 http://www.domain.com/hw/index.php

    I thought this trick is supposed to make the browser stays in the same URL, not something like this.

    Could anyone help me on this?

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure I understand what you're saying. If you take out the http://www.domain.com from the url it won't change the actual url in the location bar, it'll just load the 404 page in place...

  3. #3
    SitePoint Zealot Overgrow's Avatar
    Join Date
    Jan 2001
    Location
    Your basement
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use this trick all the time and I use absolute references not http:// in the .htaccess

    ErrorDocument 404 /hw/index.php

    See if that helps?
    Overgrow the Government: The Edge Forums
    presented by Overgrow Marijuana Magazine

    *warning: adult content

  4. #4
    SitePoint Zealot
    Join Date
    Feb 2001
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    doens't work

    When I tried to put this instead.

    ErrorDocument 404 /hw/index.php

    I got a real 404 error when trying to point the browser to http://www.domain.com/hw/dnet

  5. #5
    SitePoint Zealot Overgrow's Avatar
    Join Date
    Jan 2001
    Location
    Your basement
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, first try and make it redirect to something in the same directory. Like ErrorDocument 404 test.php

    If that doesn't work, you may need to edit your access.conf and set Allow Override to the appropriate setting (I forget, but I usually set Override all-- this lets .htaccess control all aspects of the directory).
    Overgrow the Government: The Edge Forums
    presented by Overgrow Marijuana Magazine

    *warning: adult content

  6. #6
    SitePoint Zealot
    Join Date
    Feb 2001
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where can I find access.conf?

    thanx

  7. #7
    Happy Holidays !! Paul S's Avatar
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    1,287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by d-net
    Where can I find access.conf?
    Hi,

    If you are using LINUX with the default Apache installation must be in /etc/apache

    Paul


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
  •