vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   404 not found when deleting threads.. (https://vborg.vbsupport.ru/showthread.php?t=309680)

lsti 03-19-2014 05:49 AM

404 not found when deleting threads..
 
Hello, i am using custom rewrite url's provided by vBulletin.

My forums are located in the forums directory.

So, when ever i delete (physically remove) a thread, it results in 404 not found. Other than that the rules work fine.

This is my actual url..

www.myurl.com/forums/forums/56-General

When i delete a therad from this section, i am taken to

www.myurl.com/forums/56-General

Which results in a 404 not found, guess the default ones have some issues if the url is in the forums folder.


Code:

RewriteEngine on

# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your vBulletin directory.
# RewriteBase /forum/

# 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} -f [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} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

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

# Check MVC result
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ - [NC,L]
RewriteRule ^(.*)$ - [R=404,L]


Any help would be appreciated.

Regards.

ForceHSS 03-19-2014 06:45 AM

https://vborg.vbsupport.ru/showthrea...ight=404+error
https://vborg.vbsupport.ru/showthrea...ight=404+error

I also have this at the bottom of my htaccess
ErrorDocument 400 /400.php
ErrorDocument 401 /401.php
ErrorDocument 403 /403.php
ErrorDocument 404 /404.php
ErrorDocument 500 /500.php

lsti 03-21-2014 05:50 AM

Quote:

Originally Posted by ForceHSS (Post 2488269)
https://vborg.vbsupport.ru/showthrea...ight=404+error
https://vborg.vbsupport.ru/showthrea...ight=404+error

I also have this at the bottom of my htaccess
ErrorDocument 400 /400.php
ErrorDocument 401 /401.php
ErrorDocument 403 /403.php
ErrorDocument 404 /404.php
ErrorDocument 500 /500.php

Thanks but i think you have mis understood my question. When we delete a thread, we should be directed to forum display right? but mine is taking to 404 not found. Check the url's i posted.

ForceHSS 03-21-2014 05:51 AM

And the above should fix the problem

Jain Farstrider 03-21-2014 08:51 AM

1 Attachment(s)
I assume it is safe to do so in my case but am I able to put in below the rewrite engine in my .htaccess? Just mildly concerned since I assume that rewrite in my .htaccess is regarded as custom and thus I cannot use the plugin from ForceHSS's reply post.

I guess it works the same as additional .css which you can put in as many diffrent snippets as you need?

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

lsti 03-21-2014 08:57 AM

Quote:

Originally Posted by ForceHSS (Post 2488680)
And the above should fix the problem

I tried this but it didn't fix the problem.

https://vborg.vbsupport.ru/showthrea...ight=404+error


Since i am on 5.3, i haven't tried the other one.

lsti 03-25-2014 03:34 AM

BUMP!!

ForceHSS 03-25-2014 03:54 AM

Quote:

Originally Posted by lsti (Post 2488697)
I tried this but it didn't fix the problem.

https://vborg.vbsupport.ru/showthrea...ight=404+error


Since i am on 5.3, i haven't tried the other one.

Are you using vb5? Also the site link u have in the first post no forums are installed on it

lsti 03-25-2014 07:14 AM

Quote:

Originally Posted by ForceHSS (Post 2489406)
Are you using vb5? Also the site link u have in the first post no forums are installed on it

No, i am on vb4.2.2. I meant the PHP version 5.3.0

yes, that's just an example url.

Seven Skins 03-25-2014 10:13 AM

Try this ...

Edit htaccess file From
Code:

# RewriteBase /forum/
To

Code:

RewriteBase /forum/

Edit forum to forums if needed.

.

lsti 03-25-2014 01:44 PM

Quote:

Originally Posted by Seven Skins (Post 2489431)
Try this ...

Edit htaccess file From
Code:

# RewriteBase /forum/
To

Code:

RewriteBase /forum/

Edit forum to forums if needed.

.

Thanks but still same error.

Not Found

The requested URL /forums/56-General was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

lsti 03-27-2014 05:47 AM

Well, is there any one to assist me with this?

Thanks.

Seven Skins 03-28-2014 03:44 PM

Link to your site will help.

There might be a confilct from the htaccess file above your forums folder.
You may try this soultion (it may or may not work) ... to the htaccess file in forums folder, add the code below to the first line.

Code:

RewriteEngine Off
Your htaccess file should start like this:

Code:

RewriteEngine Off

RewriteEngine on

# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your vBulletin directory.
# RewriteBase /forum/


Lynne 03-28-2014 06:03 PM

If your forums are really in a directory called /forums/forums/, then the RewriteBase would be:

RewriteBase /forums/forums/

lsti 03-28-2014 08:20 PM

Quote:

Originally Posted by Seven Skins (Post 2490063)
Link to your site will help.

There might be a confilct from the htaccess file above your forums folder.
You may try this soultion (it may or may not work) ... to the htaccess file in forums folder, add the code below to the first line.

Code:

RewriteEngine Off
Your htaccess file should start like this:

Code:

RewriteEngine Off

RewriteEngine on

# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your vBulletin directory.
# RewriteBase /forum/


I even tried removing the htaccess file in the root folder and tried your suggestions. But no luck.

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

Quote:

Originally Posted by Lynne (Post 2490084)
If your forums are really in a directory called /forums/forums/, then the RewriteBase would be:

RewriteBase /forums/forums/


My forums are in the forum directory.

/forums

After the url rewrite it turns to /forums/forums/

I think if we can get rid of the forums rewrite, we can fix this.

Also i tried commenting out this but resulted in 404 not found error, when i open a forum category but threads work fine.

Code:

RewriteRule ^forums/.* forumdisplay.php [QSA]

Lynne 03-28-2014 11:05 PM

Quote:

Originally Posted by lsti (Post 2490108)
My forums are in the forum directory.

/forums

Then it needs to say:

RewriteBase /forums/

(not RewriteBase /forum/ or RewriteBase /forums/forums/)

lsti 03-29-2014 10:27 AM

Quote:

Originally Posted by Lynne (Post 2490158)
Then it needs to say:

RewriteBase /forums/

(not RewriteBase /forum/ or RewriteBase /forums/forums/)


I already did that, but still the problem exists.

Lynne 03-29-2014 05:09 PM

Is your actual Forum url set to yoursite.com/forums? Do you have anything entered into the Forum Component URL textarea?

Try disabling your modifications/plugins and see if you still have this problem.
Note: To temporarily disable the plugin system, edit includes/config.php and add this line right under <?php

define('DISABLE_HOOKS', true);

ForceHSS 03-29-2014 05:13 PM

Might be best to put in a support ticket and let someone from support fix it

lsti 03-30-2014 05:43 PM

Quote:

Originally Posted by Lynne (Post 2490282)
Is your actual Forum url set to yoursite.com/forums? Do you have anything entered into the Forum Component URL textarea?

Try disabling your modifications/plugins and see if you still have this problem.
Note: To temporarily disable the plugin system, edit includes/config.php and add this line right under <?php

define('DISABLE_HOOKS', true);


Yayyyyyy.

Setting up the forum component url fixed the issue.

Thank you very much Lynee & others who helped me to fix the issue :)

Thanks guys.

lsti 03-31-2014 06:46 PM

Now when i visit my forum home page instead of forum.php, it says this error.

It says invalid forum
Invalid Forum specified. If you followed a valid link, please notify the administrator

But the forum.php works fine, removing the forum component url fixes the issue though.


All times are GMT. The time now is 05:28 PM.

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.01174 seconds
  • Memory Usage 1,774KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (10)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete