Subdomain error 500

The forum restricts URLs which makes it virtually impossible to type a description of a problem with URL software. So here’s an image.

What am I doing wrong please?

Can you use docker for this domain?


(blah blah extra stuff to make 20 characters in my reply)

Hello @exekutive, thanks for your message.

Try to change:

RewriteBase /u/


RewriteBase /

(Also better to remove YOURLS part at root.)

OK so I completely removed the .htaccess file from root.

and I made the changes to the .htaccess file in the yourls dir “u” as you suggested. (I didn’t type that there. It was generated automatically).
Now it has:

Options -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /u/yourls-loader.php [L]

No change. Still Error 500.

If anybody wants, I can provide an FTP and yourls account on the server, via PM.

Where does your u domain point?
Which folder is the root for

It’s in my firs post. points to root/u

Ah, indeed (but posting it as image is not the easier to be read :wink:).

Change also the following:

RewriteRule ^.*$ /u/yourls-loader.php [L]


RewriteRule ^.*$ /yourls-loader.php [L]

You need to configure it as it was root.
Then just follow the documentation.

(the image can be clicked on and enlarged)

Ah! I understand now.

Even though I have yourls installed in a subdirectory, my .htaccess file should be entered as if it was root, because I have set up the subdomain to point to the subdirectory.

I made the change, and the subdomain works, but now I can’t use the regular domain.
visiting now gives me an error404. Is there any way to make yourls work with the domain AND subdomain?

It might be possible with apache config expert tweaking, but I won’t recommend doing it, especially if you’re not very confident with .htaccess files.

1 Like

Fair enough. Thanks for your help! :slightly_smiling_face:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.