Announcement

Collapse
No announcement yet.

.htaccess and custom 404

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • downloadsUK
    replied
    So it would just error after 20 redirects rather than 10? That doesn't exactly address the problem....

    Leave a comment:


  • Steve Machol
    replied
    You need to follow the advice given:

    Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.

    Leave a comment:


  • downloadsUK
    replied
    So I'm back here with some error loggage. Please take a look at this from my hosting:

    [Thu Apr 07 11:12:52 2011] [error] [client 178.32.59.13] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
    [Thu Apr 07 11:12:52 2011] [error] [client 178.32.59.13] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    Thoughts?

    Leave a comment:


  • downloadsUK
    replied
    This is a horrible hash, but I've managed to fix it a little myself:

    Code:
    #RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
    RewriteRule ^(content)/(.*|$)$ $1.php?r=$2 [QSA]
    like I said, if you just examine the vbullletin rewrite rule you can see that's the one that allows the /content/1-my-article friendly URLS to work

    re-jigging it so it doesn't capture EVERY url and then try to rewrite which it can't and then spazzing out and 500 error I can force it to capture the right link from within the CMS,

    I have contacted my webhost and I am waiting on a reply. Hope this helps you help others in the future.

    I'll be back. With my error logs. Heh.

    Leave a comment:


  • Zachery
    replied
    Youneed to contact your webhost to get the real errror message, those interal server errors are only logged to apache itself, not specific sites.

    Leave a comment:


  • downloadsUK
    replied
    I'm trying to get at the error logs - they are not readily available under cpanel - or this error 500 is not being recorded. However, it's indicative from the post above and the attachment that it cannot use the ErrorDocument directive properly - because it's not compatible with the current .htaccess. What say you?

    Leave a comment:


  • Zachery
    replied
    We need the REAL error message that is causing the internal server error, contact your webhost for more help with this.

    Leave a comment:


  • downloadsUK
    replied
    You can see the error for yourself...

    This is the original unmodified vbulletin .htaccess file I am using:

    Code:
    RewriteEngine on
    # This file is only needed if you have set the CMS URL in your admincp and you are 
    # using the mod_rewrite option for friendly urls.  If this is the case, copy this file
    # to your cms stub directory.
    
    # If you are having problems or are using Vi
    # RewriteBase /cms-stub-directory/
    
    # If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.
    # Options -MultiViews
    
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    
    RewriteRule ^.*$ - [NC,L]rtualDocumentRoot, uncomment this line and set it to your vBulletin directory.
    
    # MVC
    RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
    If I delete the line

    Code:
    # MVC
    RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
    then inserting the error document line works. So it's clearly the .htaccess that is not compatible with the standard ErrorDocument directive.

    The error I get is: see attached fileClick image for larger version

Name:	Untitled.jpg
Views:	1
Size:	23.6 KB
ID:	3681838
    Last edited by downloadsUK; Wed 6th Apr '11, 10:00am. Reason: attach an image

    Leave a comment:


  • Zachery
    replied
    We'd need to know the cause of the internal server error before we can trouble shoot it.

    Leave a comment:


  • downloadsUK
    started a topic [Forum] .htaccess and custom 404

    .htaccess and custom 404

    Using the VB supplied .htaccess files seems to be all working fine and dandy.... except...

    when I test my 404 response I get a 500 Internal Server error. I've tried searching for solutions to this issue on this site, google and vbulletin.org and no cigar.

    I created my own custom VB page here http:/www.download.co.uk/forums/404nf.php

    but if you put something like http://www.download.co.uk/thisisclearlygoingto404

    it just fails with an error, and not even a 404, but a 500 Internal error?

    Before anyone says anything, I've also tried putting ErrorDocument 404 /forums/404nf.php into my .htaccess file and it still spazzes out.

    VB guys care to point out "you're doing it wrong"?

Related Topics

Collapse

Working...
X