-
Notifications
You must be signed in to change notification settings - Fork 5
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
Basic Installation Using Provided Instructions Results in 403 Error #14
Comments
@gerbz - just wanted to add that I have checked permissions of files/folders as well and they all seem to be set as they should be. So I'm unsure why I'm receiving a 403. Thanks, -Buki |
Same issue. Solved by replacing the three RewriteRules with just this one: RewriteRule ^([-0-9A-Za-z]+(+(all)?)?~?)/?$ http://shorturl.com/yourls/$1 [L] It has been suggested in another post here. Hope it helps someone else just as it helped me. |
I'm currently experiencing this 403 error and the suggested RewriteRule change caused a 500. Any other thoughts? |
This is what did it for me. I have my Yourls installation on a subdomain (i.e. https://link.doma.in) and wanted to redirect all shortened links to work with just the base URL (i.e. https://doma.in/shortcode). I set up my short domain as a subdomain on another domain (i.e. doma.in.otherdomain.com) where my base short domain A record points to (i.e. https://doma.in redirects to https://otherdomain.com). I set up a separate .htaccess file in the new subdomain directory with the following instructions:
My use case was very specific (I wanted to be able to use my domain for both short URLs, have the base URL redirect to my personal website, and use my web host email with my shortdomain), but this solution ended up checking all of the boxes for me. Based on your setup, you may find similar success with the above rewrite rules, which are a variation on the original installation instructions and slightly differ from the suggestion above. |
@gerbz
Hi There,
This plugin describes exactly what we would like to do, but we are having issues getting its basic functionality going.
Here is what we are doing step-by-step. If you or someone here could help point me in the right direction, that would be awesome.
Our goals:
https://localhost/redirects/
.https://localhost/redirects/admin/index.php
.https://localhost
. Example short urlhttps://localhost/page1
Here are the specs of our setup:
Apache - php 7.3 or 7.4 (same setup on both with same results)
MySQL - 5.7.30
Entire installation is completely fresh. No additional plugins are activated except for swap-short-url.
.htaccess files:
Installation .htaccess file (generated automatically upon installation) is located in -->
https://localhost/redirects/.htaccess
It contains the following directives:
.htaccess file in the domain root is located at -->
https://localhost/.htaccess
it contains the directives specified in the swap-short-url installation read-me file and is noted below:
config.php adjustment
config.php file in installation directory is located at -->
https://localhost/redirects/user/config.php
RESULTS
Everything appears as it should, but does not result in a successful redirect.
In the admin area, short urls are successfully defined with the following format
https://localhost/shorturl1
https://localhost/shorturl2
and so on...
When the shortened URL is entered into the browser, the redirect starts to happen, but stops at the base url...
https://localhost/redirects/
and a 403 Forbidden error is returned. (see screenshot)
Any help/guidance you can provide would be very helpful.
Thanks,
-Buki
The text was updated successfully, but these errors were encountered: