Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request shorter URL for simple-search #19

Open
funderburkjim opened this issue Dec 5, 2020 · 25 comments
Open

Request shorter URL for simple-search #19

funderburkjim opened this issue Dec 5, 2020 · 25 comments
Assignees
Labels
cleanup Code and UI cleanup

Comments

@funderburkjim
Copy link
Contributor

This was discussed in #18.

The request by @gasyoun is to use

https://www.sanskrit-lexicon.uni-koeln.de/s/...

in place of current

https://www.sanskrit-lexicon.uni-koeln.de/simple/...
@gasyoun
Copy link
Member

gasyoun commented Dec 5, 2020

Not just

https://www.sanskrit-lexicon.uni-koeln.de/s/

but even

https://sanskrit-lexicon.uni-koeln.de/s/

@funderburkjim
Copy link
Contributor Author

The 'www.' is not required:

https://sanskrit-lexicon.uni-koeln.de/simple/lan/ca

I'm still not comfortable changing 'simple' to 's', however.

@gasyoun
Copy link
Member

gasyoun commented Dec 9, 2020

The 'www.' is not required

Let us have a rule that www. is redirected no to non-www, so it never arrives anymore. No need to have it. Length matters.

@funderburkjim
Copy link
Contributor Author

The way the .htaccess rule is written,

both https://sanskrit-lexicon.uni-koeln.de/simple/lan/ca

and https://www.sanskrit-lexicon.uni-koeln.de/simple/lan/ca

work the same.

So, its just a matter of user convention which is used. When we document or publicize the
link, we can use the non-www version.

@gasyoun
Copy link
Member

gasyoun commented Dec 21, 2020

So, its just a matter of user convention which is used. When we document or publicize the
link, we can use the non-www version.

Thanks a lot!

Now we have:
https://www.sanskrit-lexicon.uni-koeln.de/scans/SKDScan/2020/web/index.php (75 characters)

Let us have:
https://sanskrit-lexicon.uni-koeln.de/scans/SKD/ (49 characters)

  1. www. (4 characters), sanskrit-lexicon is already a subdomain of uni-koeln.de
  2. index.php (9 characters), web/index.php and web/ both work identically at least since 1999, when I first learned the lesson
  3. /scans/SKDScan/2020/web/ remains, (25 characters). What if we leave /scans/SKD/20/ (15 characters) or even /scans/SKD, so make 20 open by default, if needed only then introduce additional year (20 instead of 2020)

Short links will never break! A 26 character shorter link will break 100 times less frequent.

@gasyoun gasyoun added the cleanup Code and UI cleanup label Dec 21, 2020
@alexander-myltsev
Copy link

I suggest to resolve the issue by modifying the Apache config with rules that rewrite URL. @funderburkjim , could you give me access to the server? My telegram is alex_myltsev. @gasyoun Mārcis is OK with that :)

@funderburkjim
Copy link
Contributor Author

access to the server?

@alexander-myltsev Sorry, no.

If you want to suggest rewrite rule (s), please provide one such (to start), and I'll examine and perhaps put it in an .htaccess file on the server as an experiment.

If you do supply such an .htaccess rule, please provide good documentation of

  • what you expect the rewrite rule to accomplish; include many examples.
    • I have found the documentation of rewrite rules to be obscure and difficult to test.
  • the directory in whose .htaccess file the rule should be placed.

@alexander-myltsev
Copy link

@funderburkjim I need to run it locally to experiment with Apache rules. is there the instruction how can I run the project locally?

@funderburkjim
Copy link
Contributor Author

There are some instructions at https://github.com/sanskrit-lexicon/COLOGNE/tree/master/localinstall

You should take a look at the mac notes, even if you are installing on Windows (xampp instructions).
Especially the 'download1.sh and or download2.sh in mac notes may be userful.

xampp provides a local apache-php server. If you already have such a server (e.g. on a linux box),
you don't have to use xampp.
But the xampp installation instructions also allow remaking dictionaries which require more installations, such as Python.

@funderburkjim
Copy link
Contributor Author

funderburkjim commented Mar 9, 2023

One option would be, on a Windows PC,

  • install xampp (and sqlite3), according to xampp instruction directory/
  • install displays for maybe two dictionaries (say mw and md).

You will then have a file system like:

  • cologne (in htdocs directory of xampp)
    • mw
    • md
    • .htaccess

You can make copies of say md, with other names (more like the cologne server directories)

your display urls will be like localhost/cologne/md/web/,
or localhost/cologne/md/web/webtc/indexcaller.php.

To play with urls more similar to those on Cologne server,
you could:

  • cd cologne
  • mkdir tscans (like scans at Cologne -- you might be able to use 'scans')
  • mkdir tscans
  • mkdir tscans/MDScan
  • cp -r md tscans/MDScan/2020

Then you would be able to use urls like http://localhost/cologne/tscans/MDScan/2020/web/webtc/indexcaller.php

@alexander-myltsev
Copy link

@funderburkjim do you occasionally have Docker file to set it up?

@funderburkjim
Copy link
Contributor Author

funderburkjim commented Mar 11, 2023

No Docker file.

Have you got a local Apache server with PHP? If not, then can you install one from XAMPP?

@alexander-myltsev
Copy link

If I make Dockerfile, would you accept PR?

@drdhaval2785
Copy link
Contributor

I think there is no harm in accepting PRs for Docker file.

@funderburkjim
Copy link
Contributor Author

All I need back from you is the .htaccess file.
I don't know what a PR is, or what 'accepting PRs for Docker file' means.

@funderburkjim
Copy link
Contributor Author

Once you have Apache with PHP, you can download a dictionary display.
Go to https://www.sanskrit-lexicon.uni-koeln.de/scans/MWScan/2020/web/webtc/download.html
and download the mwweb1.zip file, and the readme.txt file. The readme should explain what to do relative to your Apache-PHP installation, so you will have a local version of the MW dictionary.

@funderburkjim
Copy link
Contributor Author

If 'PR' means 'pull request', I would rather not add a Docker file to any of sanskrit-lexicon repositories.

@alexander-myltsev
Copy link

@funderburkjim this seems like a long instruction to follow :) If you host the server in a cloud, may be you can clone the existing machine for my dev/test needs?

@funderburkjim
Copy link
Contributor Author

Looks like we are stuck.
The sanskrit-lexicon web site is hosted by the University of Cologne in Germany.
I do not own the server.

@alexander-myltsev
Copy link

@funderburkjim I compose, test locally and provide you the Apache config file only. without installing the sanskrit-lexicon. would you merge it on your own?

@funderburkjim
Copy link
Contributor Author

sounds like a plan. One question - you said apache config file. Why not .htaccess?

@alexander-myltsev
Copy link

Sure, let it be .htaccess.

@gasyoun
Copy link
Member

gasyoun commented Jan 4, 2024

@alexander-myltsev still doable?

@gasyoun
Copy link
Member

gasyoun commented Jan 31, 2025

@alexander-myltsev no?

@alexander-myltsev
Copy link

Should be, but I don't have time capacity for that one. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code and UI cleanup
Projects
None yet
Development

No branches or pull requests

4 participants