The solution for Short (SEO Friendly) URL's

Ruud

Yes,

I am currently testing with V3.
It will also work with bakery and topics pages,
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

N1kko

Is there any plans to add support for other modules such as bakery?
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

dana

That seems to have done the trick. :) Thank you so much!
[url=http://www.dana-svedova.cz]Webdesign by Dana[/url]

Ruud

Another option:
if(method_exists($wb,'preprocess')) $wb->preprocess($wb_page_data); //process internal links first (WB283 problem)
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

dana

Hmm, that doesn't seem to be working.  :| It says the same thing.
[url=http://www.dana-svedova.cz]Webdesign by Dana[/url]

Ruud

In the droplet it shows on line 3:
$wb->preprocess($wb_page_data); //process internal links first (WB283 problem)

change that into:
if(is_object($wb)) $wb->preprocess($wb_page_data); //process internal links first (WB283 problem)
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

dana

Thanks, though this is not the site that's giving me problems.
[url=http://www.dana-svedova.cz]Webdesign by Dana[/url]

BlackBird

@Dana: The link in your signature is broken. Missing :
[url=http://wbaddons.webbird.de]http://wbaddons.webbird.de[/url] [url=http://www.WebsiteBaker.org/forum/index.php/topic,27476.msg189845.html#msg189845]Don't miss this[/url]

dana

Okay, switched to report all errors and got this:

Fatal error: Call to undefined method wb::preprocess() in /home/www/studynet.cz/modules/droplets/droplets.php(37) : eval()'d code on line 3
[url=http://www.dana-svedova.cz]Webdesign by Dana[/url]

dana

Ok, I will try that. Just wanted to say that I'm using a fresh install, newest ShortURL and when I deleted the [[ShortURL]] from my template, all went smoothly with no blank page.  :|
[url=http://www.dana-svedova.cz]Webdesign by Dana[/url]

Ruud

A blank page is usually pointing to some other error.

I just tested with the current shorturl version 2.3 and it is working fine for me.

Try switching on the error_reporting and see if any error is shown.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

dana

I've found that when I'm using the ShortURL ([[ShortURL]] in my template) and want to register, after successful registration I get a blank page. The registration details are sent, the user is in the database. Can it be fixed please? I'd like short URLs of the pages (don't care much about the account folders, etc.) but I also need user registration and blank page is kinda unacceptable. :)

Thank you!
[url=http://www.dana-svedova.cz]Webdesign by Dana[/url]

nibz

Little notice with using this module: (you can list this at your "Problems" page, though this isn't a really a problem!)

The module will not load pages at the rood called:


  • Templates
  • Temp
  • Search
  • Pages
  • Modules
  • Media
  • Languages
  • Include
  • Framework
  • Admin
  • Account

And also the children will not be loading!

Ruud

This is going a bit too much off topic.
I have sent you a PM.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

Meint

Hi Ruud,

I could also use the news module as a blog. The short url does work for that. Do you know how to make it possible to change "post" into the page title?

Meint

Ok, I am going to further investigate. Thanks so far.  :-)

Ruud

If I remember correctly, topics had some options in the config files to set a different root path for the posts.
Losing the .php will be more difficult.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

Meint

Hi Ruud,

Thanks. I removed the block and the topis are accessible via the "Read more" link.

So if I understand it correctly Topics can only work with 'pages' in the URL? Or are there other solutions?

Ruud

Short url does not know about the topics module, so shortlinks to those pages are not found by the php script.
To make it work, remove the block from the .htaccess where normal links are rewritten to short links.

Code (remove this part) Select

# If called directly - redirect to short url version
RewriteCond %{REQUEST_URI} pages
RewriteRule ^pages/(.*).php$ /$1/ [R=301,L]
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

Meint

Hi,

I am using topics in combination with the short url solution. However, when I click the "Read more" button I end up at the homepage. The site I am using is a multi language website but I also tested it on a single language website and the same happens there.

I am using the basic .htaccess from short url V2.3

I set up a test website to show you what happens. See http://test.wvmkb-server.nl

Meint


dbs

[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

Meint

Hi Ruud,

I am experimenting with your solution for shorter URLS. After installing it works fine.

However, I do have one question: When I look at the google_sitemap.php file, it still contains the URL's with 'pages' in the URL's. Do you know how to change that so Google has the sitemap with the rewritten URL's?


Ralleman

Hi Ruud,

yes you did it!  :-) Thank You!

I think additionally with your great ShortUrl, this is a second good way for short Url without showing the pages directory in frontend.
I have not tested with news modules but i think it will work.


Thank You!

Ruud

The problem is that on language changes or menu-link pages WB will do an internal 301 redirect to the full url.

This might do the trick:

RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} !200
RewriteCond %{REQUEST_URI} pages/
RewriteRule ^pages/(.*)$ /$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !^/pages/
RewriteRule ^(.*)$ /pages/$1 [QSA,L]


[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]