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

a simple tutorial for common redirecting examples? #1530

Open
abubelinha opened this issue Oct 27, 2019 · 4 comments
Open

a simple tutorial for common redirecting examples? #1530

abubelinha opened this issue Oct 27, 2019 · 4 comments

Comments

@abubelinha
Copy link

I would appreciate a simple guide, or a list of .htaccess files, showing examples of how to do some quite common redirections.

w3id.org/myname ---> my-current.domain/my-site-path/my-file.php
w3id.org/myname?a=1&b=4 ---> my-current.domain/my-site-path/my-file.php?a=1&b=4
w3id.org/myname/a_1/b_4 ---> my-current.domain/my-site-path/my-file.php?a=1&b=4
w3id.org/myname/site1 ---> my-current.domain/my-site-path/site1
w3id.org/myname/anothersite ---> my-current.domain/my-site-path/anothersite

... and so on

Perhaps this is such a basic question, but there are no links in w3id.org to any good tutorial for beginners.

@davidlehn
Copy link
Collaborator

Yes, this would be good. It's been on my todo list since forever. Lots of things have been copied around that are probably not optimal. I think the examples should be live working ones and in the an "example" directory.

@abubelinha
Copy link
Author

abubelinha commented Oct 28, 2019

Thanks @davidlehn

Some other related thoughts:

  • Nothing is said about "what is an .htaccess file".
    I believe it means an Apache web server special file, used to handle redirections from urls named after the folder where the .htaccess file is placed.
    But I might be wrong, because nothing is said about Apache (or any other particular webserver software), anywhere in w3id website.

  • In case w3id.org is using Apache to process redirections, which particular Apache version?
    It could be relevant when looking at documentation, since the syntax for instructions used inside .htaccess files could be different depending on the web server version.

@bact
Copy link
Contributor

bact commented Sep 28, 2023

@abubelinha We now have https://github.com/perma-id/w3id.org/tree/master/examples with 3 examples of .htaccess together with quick intro to .htaccess. Maybe we can work from there and add more examples.

@bact
Copy link
Contributor

bact commented Sep 28, 2023

  • w3id.org/myname ---> my-current.domain/my-site-path/my-file.php [Covered]
  • w3id.org/myname?a=1&b=4 ---> my-current.domain/my-site-path/my-file.php?a=1&b=4 [Covered; not by individual parameters, but the entire query string]
  • w3id.org/myname/a_1/b_4 ---> my-current.domain/my-site-path/my-file.php?a=1&b=4
  • w3id.org/myname/site1 ---> my-current.domain/my-site-path/site1 [Covered]
  • w3id.org/myname/anothersite ---> my-current.domain/my-site-path/anothersite [Covered]

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

No branches or pull requests

3 participants