Add .htaccess sample #8011
Replies: 11 comments 15 replies
-
A basic .htaccess could be something as:
But it could be extended with well-know tips like:
|
Beta Was this translation helpful? Give feedback.
-
If I'm not mistaken, PKP is generally against using custom URLs due to issues with indexing platforms, there's a reference here citing Google Scholar: https://forum.pkp.sfu.ca/t/restful-urls-on/32688/10 In general I support such URLs, and I think we could also add a meaningful description to them (e.g. |
Beta Was this translation helpful? Give feedback.
-
Wow... I didn't know about this. As I read James:
And this really blows my mind. So we are forced to maintain urls in a specific way because google (THE megacorporation) is too lazy to (for example) check the "generator" tag in the html code? Are we really? Honestly, it seems crazy to me and I don't think we should let google dictate the way PKP operates. I mean, if we (as a group), believe that PKP deserves clean urls, google can't impose their criteria on us, can they? Besides it's a "requirement" that is far from obvious and (as far as I know) is not documented other than in the post you comment on. In short, I suggest leaving aside what google says and open the debate on what we think as PKP. I did a quick survey and I see that most large institutional services use restfull urls, so I think it's good to standardize this and make it easier for smaller services to present themselves to the world in the same way. Personally I am in favor of clean urls as they are easier to remember and improve SEO in all search engines (that's why it's a common practice in any other CMS). Thanks for the information Jonas. |
Beta Was this translation helpful? Give feedback.
-
Yeah, it's infuriating. I took up the fight with someone from Google Scholar here: #7003. But they quit GitHub in response. It seems to be something about how GS can only decide what to index at the URL level -- they're not allowed access to Google's full indexing capabilities. My response is that this is Google's problem and we shouldn't bow to it. But Google's response is to walk away and I've been outvoted at PKP. Frankly, it's embarrassing. |
Beta Was this translation helpful? Give feedback.
-
I did remember a google person leaving a conversation the moment the arguments fell under their own weight... but I had completely forgotten the reason for the #7003 discussion. Honestly, I think the requirements should be dictated by the community and PKP (always thinking of the collective benefit) and then let google (or whoever) adapt as they want/can. 25K journals it's something that even google could ignore. I can't imagine the arguments, but if someone thinks we should give in, I think that, at least, a public statement should be issued explaining google's authoritarian attitude and why we acted as we acted. If you want, I'll take the issue to the TC for discussion and a proposal? In any case, regardless of what is proposed and finally decided, adding an example htaccess and allowing each service to decide what to do might be a good idea, isn't it? |
Beta Was this translation helpful? Give feedback.
-
On the original question: WordPress generates the |
Beta Was this translation helpful? Give feedback.
-
Hi all! I've been following this from afar. I'd like us to consider the long-term alignment towards Laravel tooling here, and also this proposal for rearranging the app structure: #1832 If we choose to re-architect the app's deployment considerably, including e.g. the Any move away from the we-deploy-on-anything flexibility of OJS would need to be considered too. I'd be nervous about shipping a |
Beta Was this translation helpful? Give feedback.
-
En Discussions no tengo claro cuando continuar un hilo o abrir uno nuevo. Si lo hago mal, avisad. Respondiendo a Nate:
Estoy sugiriendo una aproximación por fases (de un simple template a algo más dinámico), aprehendiendo del feedback que nos vaya llegando en cada momento. En un inicio el mismo template podría "autodocumentarse", explicando en su cabecera que:
Si el template crece para incorporar más modelos (pe: funcionar tras un proxy, segurizar directorios, etc) o si termina siendo un htaccess autogenerado, entonces creo que si que haría falta documentación... pero todavía veo esto muy lejos.
Llevamos un tiempo repensando como crear las imágenes docker para que sean más útiles para la comunidad (cubriendo prod, dev y testing) y para que sirvan para todas las herramientas de PKP (OxS). Uno de los cambios que incorporan las nuevas imágenes (y el detonante de este hilo) es que van a usar htaccess, pues en producción los contenedores suelen encontrarse tras un proxy-reverso y con httpS y un htaccess facilitaría que sean contenedores "plug&play" (la gran ventaja de las imágenes es que nos ofrecen un contexto muy controlado (Debian11, Apache2, MariaDB10, PHP8) así que ahí si se podemos crear reglas "sólidas como una roca"). Así que si, la idea es actualizar las imágenes existentes pero el proyecto docker-ojs sigue con la etiqueta de "Beta", así que nadie se puede quejar todavía por estos cambios. :-)
Las circunstancias por las que el template podría no funcionar son las que enumeras y seguro que alguna más... pero siempre tendrán que ver con la pericia de la persona que se encargue de la tarea. Me explico: Esa necesidad y peticiones no van a desaparecer... al contrario, con el tema de la API las reglas se han complicado un poco más, así que vamos a recibir más peticiones en ese sentido. En este sentido, un template permite:
Y respondiendo a Alec: En tanto que el template... no veo conflicto con ninguno de los elementos que enumeras como problemas potenciales. |
Beta Was this translation helpful? Give feedback.
-
The .htaccess.TEMPLATE could be something like this:
|
Beta Was this translation helpful? Give feedback.
-
It's also needed to consider if the user already has a |
Beta Was this translation helpful? Give feedback.
-
To illustrate, this is the kind of scenario where I thought a well tested .htaccess would be useful: At this moment we don't have detailed documentation to refer and we don't know what did this person tried. But probably you are right Nate and a htaccess template won't really help and the problem is the lack of tech knowledge. |
Beta Was this translation helpful? Give feedback.
-
Describe the problem you would like to solve
Forum requests usually include petitions related with rewrite rules.
Those petitions sometimes come from expert users that don't know OxS tools.
Describe the solution you'd like
Drupal includes a preconfigured .htaccess in root:
https://github.com/drupal/drupal/blob/9.5.x/.htaccess
A default .htaccess (or an example to let final user enable it) would probably help to reduce forum petitions and will make it easier to enable restfull URLs.
The file start with usual/basic config and grow in future with extra examples to uncomment with common scenarios (subdomain, subfolder, proxy...).
Who is asking for this feature?
System Administrators
p.s.: Posted on behalf of @marcbria.
Beta Was this translation helpful? Give feedback.
All reactions