Solved

Apache Redirect URL

Posted on 2013-01-25
4
438 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_
  • 2
4 Comments
 
LVL 50

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 50

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to install java on RHEL image on EC2 4 39
WebSite Direction 1 54
centos commands 6 67
SSL Certificate for IIS7 Site 2 54
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

808 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