Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-22-2010, 07:48 AM
pant pant is offline
 
Join Date: Mar 2010
Posts: 203
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Mod Rewrite Friendly URLS and 404

Hello,

Since upgrading to 4.x my custom 404 hasn't been working. Instead I've been getting a 500 error if I type in a wrong address.

Our site is www.the-sps.org

Our 404 is www.the-sps.org/404.shtml

Here is my htaccess, any ideas?

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^chemicalkicks.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.chemicalkicks.co.uk$
RewriteRule ^/?$ "http\:\/\/www\.the\-sps\.org" [R=301,L]

RewriteCond %{HTTP_HOST} ^theselfpreservationsociety.org$ [OR]
RewriteCond %{HTTP_HOST} ^www.theselfpreservationsociety.org$
RewriteRule ^/?$ "http\:\/\/www\.the\-sps\.org" [R=301,L]

RewriteCond %{HTTP_HOST} ^***************.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.******************.co.uk$
RewriteRule ^/?$ "http\:\/\/www\.the\-sps\.org" [R=301,L]

RewriteCond %{HTTP_HOST} ^theselfpres.the-sps.org$ [OR]
RewriteCond %{HTTP_HOST} ^www.theselfpres.the-sps.org$
RewriteRule ^/?$ "http\:\/\/www\.the\-sps\.org" [R=301,L]

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

# Forum
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]
RewriteRule ^blogs/.* blog.php [QSA]
ReWriteRule ^entries/.* entry.php [QSA]

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

# MVC
RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
EDIT:

Now it was suggested that I put the following code in
Code:
ErrorDocument 404 /404.shtml
but this had no effect.

--------------- Added [DATE]1277240892[/DATE] at [TIME]1277240892[/TIME] ---------------

Right, I've got this cracked.

All I had to do was remove the following code from the htaccess.

Code:
# MVC
RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
I didn't need to put in the errordocument code in the OP.

Woo hoo.

Hope this helps anyone else using the ModRewrite setting.
Reply With Quote
  #2  
Old 06-24-2010, 11:35 AM
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Posts: 2,140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad you got it figured out but that 404 page is serious offensive.
Reply With Quote
  #3  
Old 06-24-2010, 11:58 AM
pant pant is offline
 
Join Date: Mar 2010
Posts: 203
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ChopSuey View Post
Glad you got it figured out but that 404 page is serious offensive.
Cheers. May I ask why?
Reply With Quote
  #4  
Old 06-24-2010, 12:49 PM
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Posts: 2,140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the you ++++ part lol.
Reply With Quote
  #5  
Old 06-24-2010, 01:22 PM
pant pant is offline
 
Join Date: Mar 2010
Posts: 203
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nothing about the image then?
Reply With Quote
  #6  
Old 06-24-2010, 01:31 PM
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Posts: 2,140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just the word right above it.
Reply With Quote
  #7  
Old 06-24-2010, 01:39 PM
pant pant is offline
 
Join Date: Mar 2010
Posts: 203
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Look up "Maddy McCann" on google.
Reply With Quote
  #8  
Old 06-24-2010, 02:27 PM
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Posts: 2,140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lolno

NO U!
Reply With Quote
  #9  
Old 01-24-2011, 01:44 PM
GoHighVoltage's Avatar
GoHighVoltage GoHighVoltage is offline
 
Join Date: Dec 2010
Location: Edwardsville, IL
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My forum is located in a forum folder. with this rewrite on, it adds another folder? why?

For example: www.myforum.com/forum/forum.php

The rewrite does this:

www.myforum.com/forum/forums/forum.php

Adds that extra forums folder. Everything seems to work ok, but do I need to fix this?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03768 seconds
  • Memory Usage 2,236KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete