Third level domain redirect without changing url

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Third level domain redirect without changing url

Postby mad_griffith » 19. March 2019 11:47

Hi, I am trying to have my.website.tld redirect to www.website.tld/my. The constraints:

1) "my" is not a folder, but a Wordpress category with posts.

2) I would like to keep the url as "my.website.tld"

How can I accomplish that?

I put the following rules in my htaccess, but this only seem to be a standard redirect:

Code: Select all
RewriteCond %{HTTP_HOST} ^foo.website.com
RewriteRule ^(.*) http://www.website.com/bar [P]


Thank you.
mad_griffith
 
Posts: 1
Joined: 19. March 2019 11:16
XAMPP version: 7.2.9
Operating System: Mac Os Mojave

Re: Third level domain redirect without changing url

Postby Nobbie » 19. March 2019 21:06

mad_griffith wrote:How can I accomplish that?


You cannot.

Its impossible with the help of htaccess. I dont know if you have access to the server configuration (httpd.conf), the only way of keeping the URL is a so called ReverseProxy which cannot be established via htaccess, only in server configuration.
Nobbie
 
Posts: 10935
Joined: 09. March 2008 13:04


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 3 guests