How to add a rewrite rules in apache server
Clash Royale CLAN TAG#URR8PPP
up vote
-1
down vote
favorite
I want to deploy a three different URL. The problem is while I am trying to access a careers.example-study.com it is automatically rerouted to example-study.com webpage.
The details which i have a deployed are below :
1) example-study.com
2) careers.example-study.com
3) test.carees.example-stydy.com
In my first file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^example-study.com [NC]
RewriteRule ^(.*)$ http://www.example-study.com/$1 [R=301,L]
In my second file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^careers.example-study.com [NC]
RewriteRule ^(.*)$ http://www.careers.example-study.com /$1 [R=301,L]
In my third file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^test.carees.example-stydy.com [NC]
RewriteRule ^(.*)$ http://www.test.carees.example-stydy.com /$1 [R=301,L]
centos apache-httpd http https htaccess
add a comment |
up vote
-1
down vote
favorite
I want to deploy a three different URL. The problem is while I am trying to access a careers.example-study.com it is automatically rerouted to example-study.com webpage.
The details which i have a deployed are below :
1) example-study.com
2) careers.example-study.com
3) test.carees.example-stydy.com
In my first file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^example-study.com [NC]
RewriteRule ^(.*)$ http://www.example-study.com/$1 [R=301,L]
In my second file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^careers.example-study.com [NC]
RewriteRule ^(.*)$ http://www.careers.example-study.com /$1 [R=301,L]
In my third file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^test.carees.example-stydy.com [NC]
RewriteRule ^(.*)$ http://www.test.carees.example-stydy.com /$1 [R=301,L]
centos apache-httpd http https htaccess
1
If you simply want to have 3 different deployments accessible on 3 different URLs, isn't it enough to set up 3 virtual hosts? Why do you want to rewrite the URLs?
– Haxiel
Dec 3 at 9:35
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I want to deploy a three different URL. The problem is while I am trying to access a careers.example-study.com it is automatically rerouted to example-study.com webpage.
The details which i have a deployed are below :
1) example-study.com
2) careers.example-study.com
3) test.carees.example-stydy.com
In my first file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^example-study.com [NC]
RewriteRule ^(.*)$ http://www.example-study.com/$1 [R=301,L]
In my second file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^careers.example-study.com [NC]
RewriteRule ^(.*)$ http://www.careers.example-study.com /$1 [R=301,L]
In my third file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^test.carees.example-stydy.com [NC]
RewriteRule ^(.*)$ http://www.test.carees.example-stydy.com /$1 [R=301,L]
centos apache-httpd http https htaccess
I want to deploy a three different URL. The problem is while I am trying to access a careers.example-study.com it is automatically rerouted to example-study.com webpage.
The details which i have a deployed are below :
1) example-study.com
2) careers.example-study.com
3) test.carees.example-stydy.com
In my first file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^example-study.com [NC]
RewriteRule ^(.*)$ http://www.example-study.com/$1 [R=301,L]
In my second file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^careers.example-study.com [NC]
RewriteRule ^(.*)$ http://www.careers.example-study.com /$1 [R=301,L]
In my third file
Options +FollowSymLinks
RewriteEngine on
RewriteCond %HTTP_HOST ^test.carees.example-stydy.com [NC]
RewriteRule ^(.*)$ http://www.test.carees.example-stydy.com /$1 [R=301,L]
centos apache-httpd http https htaccess
centos apache-httpd http https htaccess
edited Dec 3 at 9:54
asked Dec 3 at 8:58


Prakash Asokan
13
13
1
If you simply want to have 3 different deployments accessible on 3 different URLs, isn't it enough to set up 3 virtual hosts? Why do you want to rewrite the URLs?
– Haxiel
Dec 3 at 9:35
add a comment |
1
If you simply want to have 3 different deployments accessible on 3 different URLs, isn't it enough to set up 3 virtual hosts? Why do you want to rewrite the URLs?
– Haxiel
Dec 3 at 9:35
1
1
If you simply want to have 3 different deployments accessible on 3 different URLs, isn't it enough to set up 3 virtual hosts? Why do you want to rewrite the URLs?
– Haxiel
Dec 3 at 9:35
If you simply want to have 3 different deployments accessible on 3 different URLs, isn't it enough to set up 3 virtual hosts? Why do you want to rewrite the URLs?
– Haxiel
Dec 3 at 9:35
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f485640%2fhow-to-add-a-rewrite-rules-in-apache-server%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
If you simply want to have 3 different deployments accessible on 3 different URLs, isn't it enough to set up 3 virtual hosts? Why do you want to rewrite the URLs?
– Haxiel
Dec 3 at 9:35