The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Ok so the next is...
http://www.killbillet.com/forum/rat-...nt-for-headers Above is the incorrect link. Below is the correct link. http://www.killbillet.com/showthread...+paint+headers This one looks a bit harder... Any advice? Thanks thanks thanks!!! --------------- Added [DATE]1460498265[/DATE] at [TIME]1460498265[/TIME] --------------- When we upgraded in the first place it was from a previous version. Not 4.2.3. I didn't want to have to mess around with upgrading again in the near future. Thats why I made the transition to 5.x. The emails were sent from Vbulletin. |
#12
|
|||
|
|||
Just look at the URL structure and my previous rewriterule, you'll see that it's quite easy to make a rewriterule for that.
HTML Code:
RewriteRule ^forum/(.*)/(.*)/([0-9]+)-(.*)$ showthread.php?$3-$4 [R=301,L] It will only work to URL's which are constructed like: /forum/section-name/subsection-name/threadid-threadtitle - Also, you might want to include the following in your .htaccess file: HTML Code:
RewriteBase / Or just include a backslash in front of the URL's in the RewriteRules. |
#13
|
|||
|
|||
I want to understand how this works so I am going to break this down. Hopefully you can confirm/help me understand.
Original redirect - RewriteRule ^member/([0-9]+)-(.*)$ member.php?$1-$2 [R=301,L] New New redirect - RewriteRule ^forum/(.*)/(.*)/([0-9]+)-(.*)$ showthread.php?$3-$4 [R=301,L] So the (.*) refers to any written title in a subfolder? And the ([0-9]+) is any combination of numbers 0-9 in a link? Does the $ signify the separation from the original link to the new? I almost think of it as the If x is this $(then) Y should be this? Why is the first rule $1-$2 and the second is $3-$4? And finally I am assuming this [R=301,L] is what is telling the server it is a redirect. correct? |
#14
|
|||
|
|||
RewriteRule ^forum/(.*)/(.*)/([0-9]+)-(.*)$ showthread.php?$3-$4 [R=301,L]
(.*) will match anything. ([0-9]+) will only match numbers of any length. Whenever there's a match, it will be stored inside of a variable. In this case $3 will be the third match, which is the part which checks for the number. Each part that I made red will be stored in a variable. The first URL only contains 2 different variables each time, so we only have to extract 2 variables. The second URL contains 4 different things in the URL which may not be unique, that's why we simply match it with (.*). RewriteRules and regexes are quite a pain. |
#15
|
|||
|
|||
Perfect. Thanks for breaking it down for me. You are an awesome guy Dave. If there was a service that would allow me to buy you a beer and have it delivered I would. Just saying.
--------------- Added [DATE]1460573313[/DATE] at [TIME]1460573313[/TIME] --------------- One last question on that last set of coding. That last variable varies between the two links. One has - and the other has +. Does that matter? --------------- Added [DATE]1460573408[/DATE] at [TIME]1460573408[/TIME] --------------- and can I just list these in the .htaccess file? Is there a way I have to separate them? |
#16
|
|||
|
|||
No problem.
Not quite sure what you mean with your first question but regarding your second question, just place the rewriterules under each other and it should work fine. For example: HTML Code:
RewriteEngine On RewriteBase / RewriteRule ^member/([0-9]+)-(.*)$ member.php?$1-$2 [R=301,L] RewriteRule ^forum/(.*)/(.*)/([0-9]+)-(.*)$ showthread.php?$3-$4 [R=301,L] |
Благодарность от: | ||
TheLastSuperman |
#17
|
|||
|
|||
Dave,
For the fist question. The $3 and $4 variables we are matching up from the links I sent. The first uses - or dashes to separate words whereas the other style uses the + or plus sign to separate the words. Does that matter at all? Or are they considered the same thing? |
#18
|
|||
|
|||
A + being used to separate words is rather odd because a + is considered as a space.
Were you referring to this URL? http://www.killbillet.com/showthread...+paint+headers Because the last part is a "highlight" part, that parameter is not required in order for the link to work. |
#19
|
|||
|
|||
I uploaded your coding and it gave me a 404 error. This is what the link shows...
http://www.killbillet.com/home/killb...nt-for-headers Did I do something wrong? |
#20
|
|||
|
|||
Did you also add "RewriteBase /" after "RewriteEngine On"?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|