vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - DC SEO vB URL Rewrite (https://vborg.vbsupport.ru/showthread.php?t=91324)

Zhen-Xjell 11-16-2005 08:48 PM

Quote:

Originally Posted by Dontom
Hello,
I intend to use this on a german forum - we use umlauts there (a,?,?,?) - will the code from here (https://vborg.vbsupport.ru/showpost....&postcount=348) replace them by their english equivalents? (ae, ue, oe, ss)

Thanks
Thomas

Hi Dontom, I use Dean's code too, and the umlaut's are preserved:

http://de.castlecops.com/forum

Dean C 11-17-2005 01:24 AM

Quote:

Originally Posted by Dontom
Hello,
I intend to use this on a german forum - we use umlauts there (a,?,?,?) - will the code from here (https://vborg.vbsupport.ru/showpost....&postcount=348) replace them by their english equivalents? (ae, ue, oe, ss)

Thanks
Thomas

The latest version replaces foreign characters with their english equivalent. But I have yet to decide whether to replace foreign chars or not yet :) Please bare in mind I have not yet released the latest version.

Dontom 11-17-2005 03:37 AM

Thank you both for your answer! I will wait then for the next version
Thomas

descds 11-17-2005 04:14 PM

OK i tried this but for some reason i couldn't get it to work.

I already have SEO friendly url's running in my subdreamer part of the site so i uploaded the plugin and put the copied

PHP Code:

RewriteRule ^f([0-9]+)-([A-Za-z0-9\-]+)\.htmlforumdisplay.php?f=$[L]
RewriteRule ^t([0-9]+)(((-p)([0-9]+))?)([A-Za-z0-9\-]+)\.htmlshowthread.php?t=$1&page=$5&pp=10 [L

To my already established .htaccess file

PHP Code:

Options All -Indexes
Options 
+FollowSymLinks
RewriteEngine On
RewriteBase 
/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^(.*) index.php 

so i ended up with

PHP Code:

Options All -Indexes
Options 
+FollowSymLinks
RewriteEngine On
RewriteBase 
/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^(.*) index.php

RewriteRule 
^f([0-9]+)-([A-Za-z0-9\-]+)\.htmlforumdisplay.php?f=$[L]
RewriteRule ^t([0-9]+)(((-p)([0-9]+))?)([A-Za-z0-9\-]+)\.htmlshowthread.php?t=$1&page=$5&pp=10 [L

It was working in as much to say that the forum links changed to html links but clicking them resulted in a page not found.

So i thought maybe its the base url as my forums, like many, are in the /forum/ directory of the root.

So i removed that, still the same. So i changed too

RewriteBase /forum

Still the same

and tried

RewriteBase /forum/

Still the same. What did i do wrong ? :)

Dean C 11-17-2005 11:57 PM

It's not that simple descds. This rule redirects everything (which is a bad thing), but I won't get into a discussion on poor usage of mod_rewrite now:

Code:

RewriteRule ^(.*) index.php
This will send every single URL you type to index.php. Why it's doing that I have no idea. This should be a temporary fix for you though:

Code:

Options All -Indexes
Options +FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^f([0-9]+)-([A-Za-z0-9-]+).html$
RewriteCond %{REQUEST_URI} !^t([0-9]+)(((-p)([0-9]+))?)([A-Za-z0-9-]+).html$
RewriteRule ^(.*) index.php

RewriteRule ^f([0-9]+)-([A-Za-z0-9-]+).html$ forumdisplay.php?f=$1 [L]
RewriteRule ^t([0-9]+)(((-p)([0-9]+))?)([A-Za-z0-9-]+).html$ showthread.php?t=$1&page=$5&pp=10 [L]

Give it a try anyway :)

descds 11-18-2005 06:30 AM

Quote:

Originally Posted by Dean C
It's not that simple descds. This rule redirects everything (which is a bad thing), but I won't get into a discussion on poor usage of mod_rewrite now:

Code:

RewriteRule ^(.*) index.php
This will send every single URL you type to index.php. Why it's doing that I have no idea. This should be a temporary fix for you though:

Code:

Options All -Indexes
Options +FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^f([0-9]+)-([A-Za-z0-9-]+).html$
RewriteCond %{REQUEST_URI} !^t([0-9]+)(((-p)([0-9]+))?)([A-Za-z0-9-]+).html$
RewriteRule ^(.*) index.php

RewriteRule ^f([0-9]+)-([A-Za-z0-9-]+).html$ forumdisplay.php?f=$1 [L]
RewriteRule ^t([0-9]+)(((-p)([0-9]+))?)([A-Za-z0-9-]+).html$ showthread.php?t=$1&page=$5&pp=10 [L]

Give it a try anyway :)


Thanks Dean but it didn't work :( My SEO friendly urls for subdreamer worked perfectly well but the forum ones results in a page not found on clicking ...

Any other ideas ?

Dean C 11-18-2005 09:57 AM

Do you have subdreamer and your forum in the same directory?

ginger22 11-18-2005 10:10 AM

Some questions about this hack:
1. Bug in thread, when it displayes pages, i.g. page2 have http://www.alpari-idc.com/en/forum/t...his-forum.html and page 3 of 3 have - http://www.alpari-idc.com/en/forum/s...9&page=3&pp=10
why?
2. How about "Last post" in forum index? it have http://www.alpari-idc.com/en/forum/s...=newpost&t=291, but i want to have hack this too.

P.S. Sorry for my English.

descds 11-18-2005 11:18 AM

Quote:

Originally Posted by Dean C
Do you have subdreamer and your forum in the same directory?

No dean. Subdreamer is off the root and the forum is in forum/

Dean C 11-18-2005 01:16 PM

Quote:

Originally Posted by descds
No dean. Subdreamer is off the root and the forum is in forum/

Then put just put the .htaccess file that is in the original zip in the forum directory ;)


All times are GMT. The time now is 06:33 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.01615 seconds
  • Memory Usage 1,767KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete