phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Bad Request (Invalid URL)

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » General Discussions
::  
Author Message
seikan



Joined: 30 Jul 2008
Posts: 3

Bad Request (Invalid URL)Posted: Wed Jul 30, 2008 9:52 am    Post subject: Bad Request (Invalid URL)

I get "Bad Request (Invalid URL)" error if my topic is too long. Any idea how to fix this? Thank you.
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3987

Bad Request (Invalid URL)Posted: Wed Jul 30, 2008 1:35 pm    Post subject: Re: Bad Request (Invalid URL)

Looks like your server settings does not accept too long urls.

If you cannot change the limitation, you can limit topic titles length.

You can do this in all your theme's template/posting_editor.html :
Quote:
<input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" />


You can put something shorter for the first red bold value of maxsize and set the second to the same limit.
This way, user will have to use shorter titles.

Activating the small word removing could help too, and if you are using the virtual folder option, you could as well think of shorter forum urls.

To access the broken topics, you can deactivate the zero dupe for a second and then load it using the natural url and edit it's title from there before you turn the zero dupe on again.

++

_________________
phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible !
Back to top
seikan



Joined: 30 Jul 2008
Posts: 3

Bad Request (Invalid URL)Posted: Thu Jul 31, 2008 1:29 am    Post subject: Re: Bad Request (Invalid URL)

Is it possible to modify the "phpbb_seo_class.php" to not rewrite the topic URL if the title is too long?
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3987

Bad Request (Invalid URL)Posted: Thu Jul 31, 2008 7:48 am    Post subject: Re: Bad Request (Invalid URL)

You could add :
Code:
      $url = substr($url, 0, 50);


After :
Code:
      $url = strtolower(trim($url, '-'));


in phpbb_seo_class.php, you'll just need to figure out the proper limit for your server (the 50 in substr($url, 0, 50)), knowing that this will only limit the topic and forum title bit, but not the full url length (forum/topic) with virtual folder on.

_________________
phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible !
Back to top
seikan



Joined: 30 Jul 2008
Posts: 3

Bad Request (Invalid URL)Posted: Thu Jul 31, 2008 7:54 am    Post subject: Re: Bad Request (Invalid URL)

This is exactly what I needed. Thank you!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » General Discussions
Page 1 of 1

Navigation Similar Topics

Jump to: