[RFC] Human Readable URLs

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Locked
User avatar
Erik Frèrejean
Registered User
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet
Contact:

Re: [RFC] Human Readable URLs

Post by Erik Frèrejean »

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
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Human Readable URLs

Post by brunoais »

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)

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Human Readable URLs

Post by imkingdavid »

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
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Human Readable URLs

Post by DavidIQ »

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
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Human Readable URLs

Post by brunoais »

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?

User avatar
Erik Frèrejean
Registered User
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet
Contact:

Re: [RFC] Human Readable URLs

Post by Erik Frèrejean »

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
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Human Readable URLs

Post by callumacrae »

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.
Made by developers, for developers!
My blog

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Human Readable URLs

Post by Oleg »

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.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Human Readable URLs

Post by DavidIQ »

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
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Human Readable URLs

Post by bantu »

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.

Locked