SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
Thread: 404 redirect trick problems...
-
May 23, 2001, 02:37 #1
- 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?
-
May 23, 2001, 08:11 #2
- 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...
-
May 23, 2001, 09:15 #3
- 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
-
May 23, 2001, 13:14 #4
- 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
-
May 23, 2001, 14:11 #5
- 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
-
May 23, 2001, 14:19 #6
- Join Date
- Feb 2001
- Posts
- 140
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Where can I find access.conf?
thanx
-
May 23, 2001, 17:02 #7
- 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?
If you are using LINUX with the default Apache installation must be in /etc/apache
Paul
Bookmarks