Home > Back-end >  URL Rewrite from "bare" domain to specific URL
URL Rewrite from "bare" domain to specific URL

Time:01-05

I need to redirect so when someone types https://mydomain.is to be redirected to https://mydomain.is/issues, I found directive how to do oposite, but not what I want. mydomain.is is site hosted in plesk.

Desired output:

https://mydomain.is --> https://mydomain.is/issues

Found this guide, but when i click Apply, it shows that web site is about to be deleted

CodePudding user response:

Have you tried using mod_rewrite? For example insert this at the beginning of your .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain\.is$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.is$
RewriteCond %{REQUEST_URI} !^/issues
RewriteRule (.*)$ /issues/$1
  • Related