Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

.htaccess help

Asked Modified Viewed 3,457 times
R
robo_rat
R
Robo Rat
"When the going gets tough, the tough hide under the table"
www.valley-venturers.wellington.net.nz
  • Member, joined since
  • Contributed 58 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
asked
Member

I have just created a .htaccess file on my server to link to a custom 404 error page:
http://www.valley-venturers.wellingto...page_id=12

This mostly works fine. When going to a non-existant url in the root directory the 404 error page appear no problems:
http://www.valley-venturers.wellingto...texist.php

Yet when it finds one in a folder it doesnot load any local images but remote images still load. See what i mean:
http://www.valley-venturers.wellingto...texist.php

So i'm not sure if there is a solution to this problem or not but any help would be greatly appreciated.
0 replies

8 posts

S
SoundreameR
S
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 5 threads in the forums
answered
Junior Member

It's because the images directory is defined according to the root directory of your web server (where maincore.php is) :)
0 replies
R
robo_rat
R
Robo Rat
"When the going gets tough, the tough hide under the table"
www.valley-venturers.wellington.net.nz
  • Member, joined since
  • Contributed 58 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Member

I figured it might be something like that. Is there any solution?
0 replies
R
robo_rat
R
Robo Rat
"When the going gets tough, the tough hide under the table"
www.valley-venturers.wellington.net.nz
  • Member, joined since
  • Contributed 58 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Member

Anyone got any ideas?
0 replies
C
cjsewell
C
  • Member, joined since
  • Contributed 65 posts on the community forums.
  • Started 3 threads in the forums
answered
Member

Use my customer errors infusion ;)
http://beta.phpfusion-mods.com/forum/...read_id=65

I had the same problem when creating this infusion.

I created this php/java script that checks if the requested page is at the correct path, if not it redirects


$requested_url = ereg_replace('\?.*', "", $_SERVER['REQUEST_URI']);
if (basename($_SERVER['PHP_SELF']) != basename($requested_url)){
    echo "<script type='text/javascript'>".
            "document.location.href='".
            ($_SERVER['PHP_SELF']).
            "?request_method=$request_method".
            "&error_id=$error_id".
            "&requested_url=$requested_url".
            "&referring_url=$referring_url".
            "&requested_url_query_srting=$requested_url_query_srting'".
        "</script>\n";

   exit;
}


Hope that helps
Edited by cjsewell on 18-04-2006 12:46,
0 replies
H
Homdax
H
Homdax 10
  • Fusioneer, joined since
  • Contributed 2,247 posts on the community forums.
  • Started 108 threads in the forums
answered
Fusioneer

For more info on .htaccess and editing in custom stuff:

VOILÁ
0 replies
R
robo_rat
R
Robo Rat
"When the going gets tough, the tough hide under the table"
www.valley-venturers.wellington.net.nz
  • Member, joined since
  • Contributed 58 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Member

I did not try the javascript but instead went straight to the custom error mod. It worked perfectly. Awesome stuff. Five stars from me.
0 replies
— 11 months later —
P
Parsa
P
Parsa 10
  • Newbie, joined since
  • Contributed 2 posts on the community forums.
answered
Newbie

Thnks, It worked great...:)
0 replies
J
jdes
J
jdes 10
  • Junior Member, joined since
  • Contributed 40 posts on the community forums.
  • Started 7 threads in the forums
answered
Junior Member

add this entry to your .htaccess filr
AddDefaultCharset UTF-8
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 8 posts
  • Votes 0 votes
  • Topic users 6 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet