Skip to main content
Clarification of view point.
Source Link
closetnoc
  • 32.9k
  • 4
  • 45
  • 69

Normally, I would say no. I am assuming that the redirect is interrupting access to the site somehow that you may not be aware of. I do not have an example of the redirect that you are using so there is a huge information vacuum in your question in that regard.

I reread everything here and I noticed that there was no redirect to answer your question. So I got busy.

Apache configuration files are either under /etc/apache2/ or /etc/local/apache2/. It is likely the files you need to edit are under /sites-available. If there is only one site on the server, the default file is the one you want to edit. Otherwise, if there are several sites, the file you want to edit will have a name format of domainname.tld.conf.

In this file, there will be a Directory directive that will point to the directory of the site. Edit this and add /home/.

If the Apache configuration files are not available to you, Here is an example redirect that may work. I have not tested it.

RewriteCond %{REQUEST_URI} !^/home/.*$ [NC]
RewriteRule ^(.*)$ http://www.example.com/home/$1 [L,R=301]

But I suspect it should work okay. You will notice that I put a condition in so that the redirect would only work where the /home directory does not exist.

Let us know how it works. I can edit the answer to update it with new ideas as we go or someone can offer a different redirect.

I reread everything here and I noticed that there was no redirect to answer your question. So I got busy.

Apache configuration files are either under /etc/apache2/ or /etc/local/apache2/. It is likely the files you need to edit are under /sites-available. If there is only one site on the server, the default file is the one you want to edit. Otherwise, if there are several sites, the file you want to edit will have a name format of domainname.tld.conf.

In this file, there will be a Directory directive that will point to the directory of the site. Edit this and add /home/.

If the Apache configuration files are not available to you, Here is an example redirect that may work. I have not tested it.

RewriteCond %{REQUEST_URI} !^/home/.*$ [NC]
RewriteRule ^(.*)$ http://www.example.com/home/$1 [L,R=301]

But I suspect it should work okay. You will notice that I put a condition in so that the redirect would only work where the /home directory does not exist.

Let us know how it works. I can edit the answer to update it with new ideas as we go or someone can offer a different redirect.

Normally, I would say no. I am assuming that the redirect is interrupting access to the site somehow that you may not be aware of. I do not have an example of the redirect that you are using so there is a huge information vacuum in your question in that regard.

I reread everything here and I noticed that there was no redirect to answer your question. So I got busy.

Apache configuration files are either under /etc/apache2/ or /etc/local/apache2/. It is likely the files you need to edit are under /sites-available. If there is only one site on the server, the default file is the one you want to edit. Otherwise, if there are several sites, the file you want to edit will have a name format of domainname.tld.conf.

In this file, there will be a Directory directive that will point to the directory of the site. Edit this and add /home/.

If the Apache configuration files are not available to you, Here is an example redirect that may work. I have not tested it.

RewriteCond %{REQUEST_URI} !^/home/.*$ [NC]
RewriteRule ^(.*)$ http://www.example.com/home/$1 [L,R=301]

But I suspect it should work okay. You will notice that I put a condition in so that the redirect would only work where the /home directory does not exist.

Let us know how it works. I can edit the answer to update it with new ideas as we go or someone can offer a different redirect.

Source Link
closetnoc
  • 32.9k
  • 4
  • 45
  • 69

I reread everything here and I noticed that there was no redirect to answer your question. So I got busy.

Apache configuration files are either under /etc/apache2/ or /etc/local/apache2/. It is likely the files you need to edit are under /sites-available. If there is only one site on the server, the default file is the one you want to edit. Otherwise, if there are several sites, the file you want to edit will have a name format of domainname.tld.conf.

In this file, there will be a Directory directive that will point to the directory of the site. Edit this and add /home/.

If the Apache configuration files are not available to you, Here is an example redirect that may work. I have not tested it.

RewriteCond %{REQUEST_URI} !^/home/.*$ [NC]
RewriteRule ^(.*)$ http://www.example.com/home/$1 [L,R=301]

But I suspect it should work okay. You will notice that I put a condition in so that the redirect would only work where the /home directory does not exist.

Let us know how it works. I can edit the answer to update it with new ideas as we go or someone can offer a different redirect.