phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC] Human Readable URLs

Publish your own request for comments or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.1/Ascraeus and 3.2/Arsia.

Re: [RFC] Human Readable URLs

Postby Erik Frèrejean » Tue Jun 12, 2012 4:03 pm

brunoais wrote:
Oleg wrote:I support viewtopic.php?p=240415#p240415, half-solutions I'd rather not do.

The problem with that is that it requires that the server supports mod_rewrite.

It should be made in such a way that it gracefully falls back to the current behavior if you don't have mod_rewrite or don't need this type of fanciness.
Available on .com
Support Toolkit developer
User avatar
Erik Frèrejean
Registered User
 
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet

Re: [RFC] Human Readable URLs

Postby brunoais » Tue Jun 12, 2012 4:59 pm

Erik Frèrejean wrote:
brunoais wrote:
Oleg wrote:I support viewtopic.php?p=240415#p240415, half-solutions I'd rather not do.

The problem with that is that it requires that the server supports mod_rewrite.

It should be made in such a way that it gracefully falls back to the current behavior if you don't have mod_rewrite or don't need this type of fanciness.

That's impossible. We don't have such directory.
Also, in order to test this you need to make a try and check if fails, script. You cannot have a fallback. There's just no way (AFAIK)
brunoais
Registered User
 
Posts: 626
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Human Readable URLs

Postby imkingdavid » Tue Jun 12, 2012 5:10 pm

What he means is there needs to be a way to disable the new URL structure to fallback on the current, e.g. viewtopic.php?t=14 instead of /t14-my-topic/ Obviously without mod_rewrite, trying to access the latter will not work, but links should be changed at runtime based on the URL setting that would be added.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 900
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Human Readable URLs

Postby DavidIQ » Tue Jun 12, 2012 5:26 pm

Maybe there's a way to detect URL rewriting capabilities at rendering time perhaps via a configuration setting. Yes yes...more options BUT there's really not a good way to detect for URL rewriting capabilities for all server types. IIS7 has a URLRewrite module that can be added and mod_rewrite is available for Apache but then there's IIS6 which has a third party plugin that can be added, and so on so forth.
Image
User avatar
DavidIQ
MOD Team Leader
MOD Team Leader
 
Posts: 753
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth

Re: [RFC] Human Readable URLs

Postby brunoais » Tue Jun 12, 2012 5:27 pm

imkingdavid wrote:What he means is there needs to be a way to disable the new URL structure to fallback on the current, e.g. viewtopic.php?t=14 instead of /t14-my-topic/ Obviously without mod_rewrite, trying to access the latter will not work, but links should be changed at runtime based on the URL setting that would be added.

Oh! Making apache/IIS/etc... add an extra GET variable to show that mod_rewrite is available?
brunoais
Registered User
 
Posts: 626
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Human Readable URLs

Postby Erik Frèrejean » Tue Jun 12, 2012 5:46 pm

brunoais wrote:
imkingdavid wrote:What he means is there needs to be a way to disable the new URL structure to fallback on the current, e.g. viewtopic.php?t=14 instead of /t14-my-topic/ Obviously without mod_rewrite, trying to access the latter will not work, but links should be changed at runtime based on the URL setting that would be added.

Oh! Making apache/IIS/etc... add an extra GET variable to show that mod_rewrite is available?

Either that, but most likely you can define the rewrite rules in such a way that they "create" the exact same URLs as you would get when this is turned off. So this should be able to implement seamlessly without dirty is_mod_rewrite=true hacks.
Available on .com
Support Toolkit developer
User avatar
Erik Frèrejean
Registered User
 
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet

Re: [RFC] Human Readable URLs

Postby callumacrae » Tue Jun 12, 2012 5:49 pm

DavidIQ wrote:Maybe there's a way to detect URL rewriting capabilities at rendering time perhaps via a configuration setting. Yes yes...more options BUT there's really not a good way to detect for URL rewriting capabilities for all server types. IIS7 has a URLRewrite module that can be added and mod_rewrite is available for Apache but then there's IIS6 which has a third party plugin that can be added, and so on so forth.

+1 for on install, but -1 for everywhere else. It's impossible to detect every method.
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 881
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: [RFC] Human Readable URLs

Postby Oleg » Tue Jun 12, 2012 6:15 pm

On the incoming side the detection is automatic. If there is anything in PATH_INFO (-ish) then the url is assumed to be a seo url and the code proceeds accordingly.

On the generating side the code has to know whether to generate seo urls or not. A safe solution is to have a toggle in config.php that people can change when they e.g. move servers.

There is also no need to guess here, anyone can review how this is done in any of competing bulletin boards.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Human Readable URLs

Postby DavidIQ » Tue Jun 12, 2012 7:29 pm

callumacrae wrote:
DavidIQ wrote:Maybe there's a way to detect URL rewriting capabilities at rendering time perhaps via a configuration setting. Yes yes...more options BUT there's really not a good way to detect for URL rewriting capabilities for all server types. IIS7 has a URLRewrite module that can be added and mod_rewrite is available for Apache but then there's IIS6 which has a third party plugin that can be added, and so on so forth.

+1 for on install, but -1 for everywhere else. It's impossible to detect every method.

Yes...that's why I said to add a configuration setting ;)
Image
User avatar
DavidIQ
MOD Team Leader
MOD Team Leader
 
Posts: 753
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth

Re: [RFC] Human Readable URLs

Postby bantu » Fri Jun 22, 2012 4:41 pm

Oleg wrote:On the generating side the code has to know whether to generate seo urls or not. A safe solution is to have a toggle in config.php that people can change when they e.g. move servers.

The problem here is that there is no way back. Once you have mod_rewrite, you will always need it, because "good URLs do not change" (another SEO rule as far as I know). As such I'd argue this feature should be an optional extension.
User avatar
bantu
3.0 Release Manager
3.0 Release Manager
 
Posts: 437
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany

Previous Next

Return to [3.x] RFCs

Who is online

Users browsing this forum: Majestic-12 [Bot] and 11 guests