vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Can change FORUMS in vBulletin URL to CATEGORY? (https://vborg.vbsupport.ru/showthread.php?t=322535)

webmastersun 05-04-2016 07:38 PM

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

greigeh 05-04-2016 07:44 PM

Isn't this because the actual directory of your vB is in '/forums' try change the directory name?

webmastersun 05-04-2016 07:54 PM

Quote:

Originally Posted by greigeh (Post 2570146)
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

greigeh 05-04-2016 09:18 PM

Quote:

Originally Posted by webmastersun (Post 2570147)
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?

CAG CheechDogg 05-04-2016 10:16 PM

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.

webmastersun 05-04-2016 10:38 PM

Quote:

Originally Posted by greigeh (Post 2570155)
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

TheLastSuperman 05-05-2016 12:40 AM

Quote:

Originally Posted by webmastersun (Post 2570144)
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]


webmastersun 05-05-2016 12:56 AM

Quote:

Originally Posted by TheLastSuperman (Post 2570177)
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 :D

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

TheLastSuperman 05-05-2016 01:22 AM

Quote:

Originally Posted by webmastersun (Post 2570178)
I tried your code but it didn't work

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

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 :p.

webmastersun 05-05-2016 01:46 AM

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.


All times are GMT. The time now is 09:29 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.01089 seconds
  • Memory Usage 1,753KB
  • 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
  • (6)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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