All Questions
28
questions
1
vote
2
answers
269
views
Apache rewrite rule for a folder to a different domain
I need to redirect all requests concerning a folder to another (old) web server called www2 keeping the entire original path, for example
https://www.example.org/thisfolder/maps/map.jsp?id=2345
must ...
1
vote
1
answer
524
views
Redirect to folder only if root from other site referrer
I have a redirect from root to subfolder. If user visits https://example.com it redirects to https://example.com/subfolder. But I want it not to redirect if referrer is my site, so user can reach root ...
1
vote
0
answers
103
views
WP with reverse proxy: Accessing Admin section from subdomain
I have a blog on a subdomain (WP installation), which for SEO reasons I’m moving to a folder structure. The subdomain and the main site are on different servers/platforms, so I’m using a reverse proxy....
0
votes
1
answer
2k
views
nginx redirects subdirectory requests without trailing slash to a URL with specified port
I have the following problem.
In my local test configuration, when I try to access https://www.testdomain.local/admin it will always redirect me to https://www.testdomain.local:8443/admin/ which ...
0
votes
0
answers
59
views
redirecting domain to subfolder with .htaccess
I'm new to using and changing the workings of a server and all that.
So far I've only had one server with one domain for myself, but now a business is getting some traction and I want to use a ...
0
votes
2
answers
247
views
Bash directory alias/redirect
I'm trying to compile a library and his dependencies (lots of dependencies), but the system that I'm using didn't have the usual directory structure. I'm searching for a method to "redirect" all the ...
1
vote
0
answers
11
views
Laravel project in subfolder of public_html gives trouble with .htaccess redirect [duplicate]
I've set up my VPS server and am trying to set up a Laravel project.
I have a /public_html/ folder with an index.html that's shown when visiting the website URL.
I have a laravel project in: /...
14
votes
2
answers
18k
views
Apache2 - 301 Redirect when missing "/" at the end of directory in the url
I haven't really noticed this Redirect(301) when requesting a url like this without slash("/") at the end: http://server/directory
The server will respone with a 301 Redirect Permanent header with a ...
1
vote
1
answer
70
views
Show website on one server in subfolder on another server
I have two websites. One website is a microsite developed by someone else, hosted on a subdomain and I would like to serve this website via a URL on the second website, for example:
test.maindomain....
0
votes
1
answer
8k
views
Nginx: Rewrite/Redirect URLs in a subdirectory to root
I want to rewrite or redirect any URLs inside a subdirectory to root, like so:
www.site.com/subdirectory/item => www.site.com/item
I tried this, but doesn't seem to work properly:
location /...
0
votes
1
answer
1k
views
Rewrite certain URL in Nginx such that another app will serve it
I have a config file for mydomain.com which is served with Drupal. Problem is this rewrite rule takes the control over any request:
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 ...
0
votes
1
answer
54
views
Apache: Use requested directory as a parameter
Here's what I'd like to do:
If a user goes to www.example.com/thislocation, I'd like to redirect to a particular script and give it "thislocation" as a parameter.
So if a user navigated to www....
2
votes
1
answer
5k
views
How to rewrite URI from root if file exists in folder?
I have a public folder in my document root. I would like to redirect all the files that are not present in document root, but are present in the public folder. (So if the same file is in two places, ...
0
votes
1
answer
147
views
Locally redirect Domain1.com to Domain2.com/subdir on one computer
I am running a FreeBSD server and I want to redirect a specific website domain to another domain including subdirectory.
I want to bypass that domain to alter the XML results it returns.
I tried the ...
4
votes
2
answers
3k
views
Wrong urls at wp-admin at wordpress with subdirectory and proxy
I am using apache2 and mod-proxy to integrate wordpress blogs into subdirectories of my TLD.
Main site: example.com
Blog1: [http://example.com/blog]
Blog2: [http://example.com/other-blog]
Apach2 ...
0
votes
1
answer
1k
views
nginx try_files confusion
The setup I'm going for is as follows: I want nginx to look for a file in the /test subdirectory, and if it's not there, serve it from it's normal uri. I figured this would be fairly straightforward ...
1
vote
3
answers
421
views
Is it possible to redirect to another geographically separate server based on folder-name in URL?
What I'm looking for is to direct visitors to geographically separate servers based on their choice of language.
Our URLs are structured like mydomain.com/en and mydomain.com/th (Thai). As on now ...
1
vote
1
answer
686
views
Wordpress htaccess redirect destroys my non-www to www redirect
In my root domain I have an .htaccess to redirect non-www to the www, and to redirect to a subdirectory (containing a temporary website). This is done using the following code:
Options +...
5
votes
3
answers
6k
views
nginx: redirect subfolder to subdomain
I'm trying to redirect a subfolder to a subdomain in nginx. I want http://example.com/~meow/ to be redirected to http://meow.example.com/. I tried the following:
location ~ ^/\~meow/(.*)$ {
...
1
vote
2
answers
4k
views
Change the document root of a parked domain?
I have run into a problem which is that my web host doesn't appear offer addon domains.
I currently have a domain name pointing to my name servers.
I went into cPanel to add an addon domain that ...
1
vote
3
answers
2k
views
subdomain redirects to subfolder
I have created a subdomain for my website (fr.mohamedkadri.com) and after 24 hours it became active but it redirects to the subfolder that I poited to (mohamedkadri.com/fr)
Is there a problem? why ...
2
votes
1
answer
4k
views
Redirecting subsite on same domain to other IIS using HTTPS
I've seen many similar questions (and answers) on this subject, but none seem to be on exactly the same situation I am facing. Which is weird since I don't think it is that special, so forgive me if I ...
5
votes
2
answers
21k
views
Apache: redirect subfolder to another IP in the LAN
I have webserver1 behind a router currently serving all http traffic to mydomain.com. I just added webserver2, and want to redirect mydomain.com/server2 traffic to that box. To the user, the redirect ...
3
votes
2
answers
2k
views
nginx howto correct the path from a back-end server redirect response under a virtual directory
The following was my deployed servers:
client ------ nginx proxy(example.com) ------ back-end server(192.168.1.20)
The nginx proxy's external URL was configured under a virtual directory http://...
0
votes
2
answers
118
views
Redirect /directory to /directory/?
I am using a (dv) server from Media Temple, and I have wordpress installed on the root of my domain.
I have a directory called support that holds a standard xhtml webpage, but if the user enters the ...
0
votes
2
answers
1k
views
How do you redirect pages from a directory to a subdirectory?
I had recently moved all the content on my website from being in the www.mysite.com/shop directory to being in the root directory. This means that I needed to redirect any request to visit a page with ...
1
vote
1
answer
257
views
Mod_rewrite to eliminate query strings
I have been working on this for a while but I'm not finding exactly what I am looking for. I am writing a webapp to let my users create and publish pieces of HTML content in a domain and URL folder ...
4
votes
1
answer
3k
views
Is it possible for a sub-directory to be on another server?
How can I have a sub-directory under a domain point to another server? For example, example.com/myscript/ should load the script located on a different server than example.com. This can be achieved by ...