Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Apache Redirect URL

Posted on 2013-01-25
4
Medium Priority
?
453 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 1336 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 664 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 1336 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Fine Tune your automatic Updates for Ubuntu / Debian
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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

688 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