DeveloperSide.NET Forums
December 12, 2019, 09:13:15 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Trouble with .htaccess  (Read 6104 times)
0 Members and 1 Guest are viewing this topic.
Jonpopnycorn
Guest
« on: January 30, 2007, 05:52:25 PM »

Im having trouble with the .htaccess that I put in the webroot folder

This is what is what I got in the .htaccess file

Quote
ErrorDocument 400 /error.php
ErrorDocument 401 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
ErrorDocument 500 /error.php

Thanks, Jon
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: January 30, 2007, 06:10:13 PM »

Under httpd.conf, find...
Code:
<Directory "/www/webroot">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Change 'AllowOverride' line to...
Code:
AllowOverride FileInfo

Restart Apache.

http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Jonpopnycorn
Guest
« Reply #2 on: January 31, 2007, 06:50:22 AM »

Does'nt work

this is what i got

/www/Apache22/conf/http.conf
Code:
<Directory "/www/webroot">
    Options Indexes FollowSymLinks
    AllowOverride FileInfo
    Order allow,deny
    Allow from all
</Directory>

/www/webroot/.htaccess
Code:
ErrorDocument 400 /error.php
ErrorDocument 401 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
ErrorDocument 500 /error.php

/www/webroot/error.php
Code:
<?php echo "The file you are looking for does not Exists or something is wrong with the page"?>
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #3 on: January 31, 2007, 04:29:42 PM »

Your error message might be too small. If it is, it would show up under Firefox, but not IE.

http://httpd.apache.org/docs/2.2/mod/core.html#errordocument

Quote
Microsoft Internet Explorer (MSIE) will by default ignore server-generated error messages when they are "too small" and substitute its own "friendly" error messages. The size threshold varies depending on the type of error, but in general, if you make your error document greater than 512 bytes, then MSIE will show the server-generated error rather than masking it. More information is available in Microsoft Knowledge Base article Q294807.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Jonpopnycorn
Guest
« Reply #4 on: February 01, 2007, 01:31:18 AM »

Works in FireFox now but not IE

This is what I got in error.php now
Code:
<?php
echo "<html><head>
<title>404 Page not Found</title>
</head><body>
<h1>404 - Page not found</h1>
<hr>
Sorry, the page you were looking for was not found
</body></html>"
;
?>


Edit: Took awile for it to go threw IE but now it works

Thank you :)

Edit #2: It stopped working for IE now :(

Edit #3: Got it to work just added a little more stuff :)
Code:
<?php
echo "<html><head>
<title>404 Page not Found</title>
</head><body>
<h1>404 - Page not found</h1>
<hr>
<!-- Sorry, the page you were looking for was not found -->
<!-- Sorry, the page you were looking for was not found -->
<!-- Sorry, the page you were looking for was not found -->
<!-- Sorry, the page you were looking for was not found -->
<!-- Sorry, the page you were looking for was not found -->
<!-- Sorry, the page you were looking for was not found -->
Sorry, the page you were looking for was not found
</body></html>"
;
?>
« Last Edit: February 01, 2007, 03:28:48 AM by Jonpopnycorn » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!