gerbz / Yourls-Swap-Short-Url

Swap out the shorturls created by yourls if you want to point them somewhere else.
11 stars 5 forks source link

Works with yourls 1.7.2, not with 1.8.1 #15

Open imtrobin opened 3 years ago

imtrobin commented 3 years ago

Hi, I have installed this plugin fine on a very old yourls installation (1.7.2) many years ago. I tried today on a new site using yourls 1.8.1, and found it does not work. The short url redirects to the install page everytime. I'm on the same shared webserver, just a different domain. Old one works (and still working), new one doesn't.

drbeco commented 2 years ago

I have updated to 1.9.1 and it seems to be working just fine.

Stats won't work, though.

drbeco commented 2 years ago

Update:

I solved the problem with stats by changing the .htaccess to:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^([0-9A-Za-z]+\+all)/?$ http://another.domain.ex/$1 [L] 
RewriteRule ^([0-9A-Za-z]+\+)/?$ http://another.domain.ex/$1 [L] 
RewriteRule ^([0-9A-Za-z]+)/?$ http://another.domain.ex/$1 [L]
</IfModule>

I'm still trying to figure out how to work peacefully with wordpress. But that is another thread. ( https://stackoverflow.com/questions/36223685/how-can-wordpress-and-yourls-peacefully-coexist-at-the-root-level )

Reference: https://github.com/gerbz/Yourls-Swap-Short-Url/issues/11