WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • The solution for Short (SEO Friendly) URL's
  • Print
Pages: 1 ... 5 6 [7]   Go Down

Author Topic: The solution for Short (SEO Friendly) URL's  (Read 184142 times)

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: The solution for Short (SEO Friendly) URL's
« Reply #150 on: April 24, 2015, 10:52:43 AM »
Quote from: dbs on April 24, 2015, 10:31:14 AM
Not Found
The requested URL /short.php was not found on this server.

Did you install WB in a subdirectory? The htaccess assumes short.php to be in the webspace root.
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: The solution for Short (SEO Friendly) URL's
« Reply #151 on: April 24, 2015, 10:55:59 AM »
looks for me, that vers 3.0 starts the rewrite in the document root of the server, but i use a subfolder of this document root
example: one of my local virtual servers = cms
subfolder for the test-wb = wbdemo
rewrite goes to cms, not to cms/WB_URL or WB_URL (like version1)

but i dont have a short.php in cms
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: The solution for Short (SEO Friendly) URL's
« Reply #152 on: April 24, 2015, 11:03:57 AM »
The whole point of using shorturl is that url's are not having any unneeded url-segments.
So it makes no sense to remove the /pages/ but add a /wbdemo/.

To make it work you will need to rewrite the rules in the htaccess to allow a subdirectory.
At least this line
Code: [Select]
RewriteRule ^([\/\sa-zA-Z0-9._-]+)$ /short.php?_wb=$1 [QSA,L]should be something like
Code: (utested) [Select]
RewriteRule ^([\/\sa-zA-Z0-9._-]+)$ /wbdemo/short.php?_wb=$1 [QSA,L]
I am not sure if you need more changes though, I never tried that :)
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: The solution for Short (SEO Friendly) URL's
« Reply #153 on: April 24, 2015, 11:31:03 AM »
i'm not the mod_rewrite-expert, but in my doku they use RewriteBase for the Start-Folder
No RewriteBase-info or a RewriteBase like a simple slash like / means: start in the document-root of this server

a rewrite rule like this
RewriteRule ^([\/\sa-zA-Z0-9._-]+)$ /short.php?_wb=$1 [QSA,L]
means also: start in the document root

a rewrite rule without leading slash means: start in the same folder like the htaccess btw the index.php in the root of wb
Everything works fine, if i dont use the leading shlash, with or without RewriteBase

please correct me, if i'm wrong
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: The solution for Short (SEO Friendly) URL's
« Reply #154 on: April 24, 2015, 12:48:13 PM »
Yes, my  local installation use a subfolder (the confg.php knows it).
After removing the slash before short.php in
RewriteRule ^([\/\sa-zA-Z0-9._-]+)$ /short.php?_wb=$1 [QSA,L]
it works for me local.
Code: [Select]
RewriteRule ^([\/\sa-zA-Z0-9._-]+)$ short.php?_wb=$1 [QSA,L]
Thx to jacobi22

It was not the WBPortable, but i will try it there also.
Logged
https://onkel-franky.de

Offline Tango

  • Posts: 15
Re: The solution for Short (SEO Friendly) URL's
« Reply #155 on: June 10, 2015, 09:26:23 PM »
Hello,

Tested this locally on PHP 5.4.40, Apache 2.4.12, MySQL 5.5.42 and WB 2.8.3 SP4 with BAKERY and some other modules installed and it works fine.

I also made a short how to install, which I think its clearer than the on posted on http://short.dev4me.nl/:

1. Download the ShortURL "hack" HERE.
2. Upload short.php and .htaccess to your website root directory (where config.php is located).
3. Create a Droplet using the code found in droplets.txt (you can name it ShortURL).
4. Add the newly created Droplet to the HTML part of your Template (for example, just after the </html>).


Thank you for your amazing work Ruud, you are a legend!
Logged

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1883
    • EFG MG
Re: The solution for Short (SEO Friendly) URL's
« Reply #156 on: June 11, 2015, 09:02:41 AM »
Getestet mit WB 2.8.3SP4  PHP 5.6.8 MySQL 5.6.24
Alles läuft so wie beschrieben
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1883
    • EFG MG
Re: The solution for Short (SEO Friendly) URL's
« Reply #157 on: June 12, 2015, 10:02:57 AM »
Ich bin verwirrt.
Habe die 2 Dateien (short.php; .htaccess) ins jeweilige root der WB-Instanz kopiert und das Droplet ShortURL erzeugt.
Bei der 1. WB-Instanz habe ich das Droplet im Template eingefügt und wie oben beschrieben getestet.
Bei den anderen WB-Instanzen wurde das Droplet nicht ins Templet eingefügt und es funktioniert genauso.
Ist das normal?
WB 2.8.3 SP3 + SP4, PHP 5.5x und 5.6x

Googletranslate
I'm confused.
Have the 2 files (short.php; .htaccess) copied to the root of the respective WB instance and the Droplet ShortURL generated.
In the 1st WB instance I have inserted the Droplet in the template and tested as described above.
In the other instances, the WB Droplet was not inserted in the template and it works the same way.
Is that normal?
WB 2.8.3 SP3 + SP4, PHP 5.5x and 5.6x
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: The solution for Short (SEO Friendly) URL's
« Reply #158 on: June 12, 2015, 10:26:54 AM »
The htaccess will rewrite an incoming request for something like /pages/home.php to /home/ .

Hover the links in the menu to see that without the droplet they will link to /pages/***.php.
The rewrite is done so the browser addressbar will show the short version.

There are two problems..
1. Google will index your pages as /pages/***.php
2. Every call needs a rewrite, causing your browser to make another call. This is making the connection to your website slower.

Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1883
    • EFG MG
Re: The solution for Short (SEO Friendly) URL's
« Reply #159 on: June 12, 2015, 01:53:32 PM »
Quote from: Ruud on June 12, 2015, 10:26:54 AM
The htaccess will rewrite an incoming request for something like /pages/home.php to /home/ .

Hover the links in the menu to see that without the droplet they will link to /pages/***.php.
The rewrite is done so the browser addressbar will show the short version.

There are two problems..
1. Google will index your pages as /pages/***.php
2. Every call needs a rewrite, causing your browser to make another call. This is making the connection to your website slower.



OK i fix it
Thanks
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline sky writer

  • Posts: 926
Re: The solution for Short (SEO Friendly) URL's
« Reply #160 on: July 10, 2015, 07:23:47 AM »
I've been using ver 3 on 2.8.3 SP3 and all seems to be working, so I am not trying to break it... but I am confused by these instructions:
Quote
4. Add the newly created Droplet to the HTML part of your Template (for example, just after the </html>).
If you are supposed to add the droplet to the HTML part of your Template, would you not put it BEFORE the </html> ?  Or maybe I do not understand.
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: The solution for Short (SEO Friendly) URL's
« Reply #161 on: July 10, 2015, 10:21:57 AM »
With the "HTML" part is actually meant: not in "PHP" code.
For this droplet it does not matter where you put it, as long as it is not within <?php  ?>.
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

  • Print
Pages: 1 ... 5 6 [7]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • The solution for Short (SEO Friendly) URL's
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2