Solved

Apache Redirect URL

Posted on 2013-01-25
4
445 Views
Last Modified: 2013-02-14
How can I configure apache to redirect a site from using www.website.com/nomad/index.php to www.website.com.  This is the routing of the webapp, so I am hoping I can configure a redirect in Apache.
0
Comment
Question by:Jack_son_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 51

Assisted Solution

by:Steve Bink
Steve Bink earned 334 total points
ID: 38821285
RewriteRule ^/?$ /nomad/index.php [QSA,R]

This rule should be placed in the site's virtual host container in the server's conf files, or in an .htaccess file in the root directory of the site.  You will also need to make sure mod_rewrite is loaded and turned on for the site in question.

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 166 total points
ID: 38821639
hmm, I assume it's the other way around:

 RewriteRule ^/nomad/index.php / [QSA,R]
0
 
LVL 51

Accepted Solution

by:
Steve Bink earned 334 total points
ID: 38823493
Yeah, depending on interpretation.  Do you want requests to the root to go to the app, or do you want requests to the app to "look" like requests to the root?

One of those two will work for sure, though.
0
 

Author Comment

by:Jack_son_
ID: 38843860
I need them to go to a subdirectory; using an mvc, so I just want to redirect right to the home page, like in IIS, although have not done it in Apache
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question