Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-04-2016, 07:38 PM
webmastersun's Avatar
webmastersun webmastersun is offline
 
Join Date: Oct 2013
Location: www.webmastersun.com
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Can change FORUMS in vBulletin URL to CATEGORY?

Hello,

Do you know how to change just a word in URL from forums to Category for forumdisplay (this is url when viewing forum display)?

of course I need to change word forums to category without using url redirection

for example:

example.com/forums/23-Content-Management

to

example.com/category/23-Content-Management

I tried to change in .htaccess file but it didn't work.

Any suggestions?

Thanks
Reply With Quote
  #2  
Old 05-04-2016, 07:44 PM
greigeh greigeh is offline
 
Join Date: Jan 2015
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Isn't this because the actual directory of your vB is in '/forums' try change the directory name?
Reply With Quote
  #3  
Old 05-04-2016, 07:54 PM
webmastersun's Avatar
webmastersun webmastersun is offline
 
Join Date: Oct 2013
Location: www.webmastersun.com
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by greigeh View Post
Isn't this because the actual directory of your vB is in '/forums' try change the directory name?
You might not read my question

I ran my forum at my domain (don't have any sub folders here) , i.e : example.com is forum

the word that I want to change, is for forumdisplay.

this is a URL for forumdisplay

http://www.webmastersun.com/forums/95-Web-Hosting

that I want to change to

http://www.webmastersun.com/category/95-Web-Hosting



Thanks
Reply With Quote
  #4  
Old 05-04-2016, 09:18 PM
greigeh greigeh is offline
 
Join Date: Jan 2015
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by webmastersun View Post
You might not read my question

I ran my forum at my domain (don't have any sub folders here) , i.e : example.com is forum

the word that I want to change, is for forumdisplay.

this is a URL for forumdisplay

http://www.webmastersun.com/forums/95-Web-Hosting

that I want to change to

http://www.webmastersun.com/category/95-Web-Hosting



Thanks

Do you have vBSEO or something similar installed?
Reply With Quote
  #5  
Old 05-04-2016, 10:16 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This might be what you are looking for ....


This feature requires that the "Always use Forum URL as Base Path" be set to yes.

This will override the main Forum URL setting for forum pages to allow the forum pages to be accessed from a different directory than the rest of vBulletin. This value can either be an absolute URL in which case it fully overrides the Forum URL or it can be a relative URL, in which case it is appended to Forum URL.

For example, if vBulletin is located at http://example.com/vbulletin then entering a value of "forum" will result in the forum being located at http://example.com/vbulletin/forum. A value of "http://www.example.com/forum" will result in the forum being located at http://www.example.com/forum. All vBulletin URLs must have the same host name.

In addition to setting the Forum Component URL, you will need to take the following steps in order for the forum to work in the new location.

If you are locating the forum in a directory other than a direct subdirectory of the vBulletin directory (http://example.com/vbulletin/forum in the above example), edit forum/vb_dir.php in the do_not_upload directory of your download package to set the vBulletin install directory. Instructions are given in that file.
Upload the forum files directory from the do_not_upload to the directory you want the forum to be located in. If you want the forum to be in http://example.com/vbulletin/myforum, create a subdirectory in your vBulletin directory called myforum and upload the forum files there.
If you are using rewrite friendly URLs, you will need to copy the .htaccess file from do_not_upload/rewrite/apache2/forum to the stub directory before uploading.
If you are using a different domain, such as forum.example.com versus www.example.com then you will need a crossdomain.xml file for the asset manager flash upload. Create a file called "crossdomain.xml" and place it in your forum subdirectory with the following contents modified to suit your domain.
<?xml version="1.0" encoding="UTF-8"?>
<cross-domain-policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFile.xsd">
<allow-access-from domain="*.example.com"/>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-http-request-headers-from domain="*.example.com" headers="*" secure="true"/>
</cross-domain-policy>

If the cookie path option is set for the site, it needs to be general enough to include all vBulletin URLs. For example, if vBulletin is located at www.host.com/mysite/vbulletin but the forum is located at www.mysite.com/mysite/forum then a cookie path of "mysite" will work, but a cookie path of "mysite/vbulletin" will not work because the cookies will not be sent to pages in the mysite/forum directory.
Reply With Quote
  #6  
Old 05-04-2016, 10:38 PM
webmastersun's Avatar
webmastersun webmastersun is offline
 
Join Date: Oct 2013
Location: www.webmastersun.com
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by greigeh View Post
Do you have vBSEO or something similar installed?
No I don't want to use any addons in this case like vBseo or dbseo.

I want to use original friendly url mod from vBulletin but just change forums to category for forumdisplay.php
Reply With Quote
  #7  
Old 05-05-2016, 12:40 AM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by webmastersun View Post
I tried to change in .htaccess file but it didn't work.
What code did you use? Please post it .

You can try adding this to .htaccess file:
Code:
RewriteCond %{THE_REQUEST} ^GET\ /forums/
RewriteRule ^forums/(.*) /category/$1 [L,R=301]
Reply With Quote
Благодарность от:
MarkFL
  #8  
Old 05-05-2016, 12:56 AM
webmastersun's Avatar
webmastersun webmastersun is offline
 
Join Date: Oct 2013
Location: www.webmastersun.com
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheLastSuperman View Post
What code did you use? Please post it .

You can try adding this to .htaccess file:
Code:
RewriteCond %{THE_REQUEST} ^GET\ /forums/
RewriteRule ^forums/(.*) /category/$1 [L,R=301]
I tried your code but it didn't work

or it redirected to /category/ but die in 1 music note

here's my htaccess code, it is code from vbulletin

Code:
# Options -MultiViews

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

RewriteRule ^.*$ - [NC,L]
RewriteRule ^blogs/.* blog.php [QSA]
RewriteRule ^entries/.* entry.php [QSA]

# Forum
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]

Honestly i don't want url redirections by htaccess, which I need is, when hover on forums (forumdisplay) then it was ..../category/...


Thanks
Reply With Quote
  #9  
Old 05-05-2016, 01:22 AM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by webmastersun View Post
I tried your code but it didn't work

or it redirected to /category/ but die in 1 music note

here's my htaccess code, it is code from vbulletin

Code:
# Options -MultiViews

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

RewriteRule ^.*$ - [NC,L]
RewriteRule ^blogs/.* blog.php [QSA]
RewriteRule ^entries/.* entry.php [QSA]

# Forum
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]

Honestly i don't want url redirections by htaccess, which I need is, when hover on forums (forumdisplay) then it was ..../category/...


Thanks
Erm not sure if that will work then w/o something like DBSEO. Reason is look at your code above ^ ... see the RewriteRule ^forums/.* forumdisplay.php [QSA] part of it? That tells it to rewrite forumdisplay.php in url to /forums/ and this is why many sites have forum/forums/ in the url which many do not like (as it looks quite silly honestly) so the only way to change it from what I recall w/o a mod like dbseo... would be to change that actual line.

Example:

Change this:
Code:
RewriteRule ^forums/.* forumdisplay.php [QSA]
TO:
Code:
RewriteRule ^category/.* forumdisplay.php [QSA]
However after checking please note the url, ensure this is a change you wish to make and that it's what you were originally asking for. The reason why mods like dbseo exist is because you can't do everything with rewrites in normal mod-rewrite friendly url setting and .htaccess, you can come pretty darn close but sometimes a mod/plugin is required and unless someone chimes in soon and puts me in my place I'll stick to my guns in my statement .
Reply With Quote
  #10  
Old 05-05-2016, 01:46 AM
webmastersun's Avatar
webmastersun webmastersun is offline
 
Join Date: Oct 2013
Location: www.webmastersun.com
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't install vbseo or dbseo on my forum

Quote:
see the RewriteRule ^forums/.* forumdisplay.php [QSA] part of it?
it is the code from vbulletin

Quote:
RewriteRule ^forums/.* forumdisplay.php [QSA]
TO:
Code:
RewriteRule ^category/.* forumdisplay.php [QSA]
I tried this in the past and today but it didn't work. I think it needs to change in some vbulletin files

The URL is in the reply #3 https://vborg.vbsupport.ru/showpost....47&postcount=3

It is default from vbulletin with Mod Rewrite Friendly URLs enabled.
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 02:00 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.04795 seconds
  • Memory Usage 2,276KB
  • 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
  • (6)bbcode_code
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete