Solved

Apache rewrite: How to rewrite the URL so that a page redirects but the URL stays the same?

Posted on 2006-10-25
2
163 Views
Last Modified: 2010-03-04
Right now I have an .htaccess file that redirects visitors to our site.

If you go here:

http://www.monkeyclaus.org/abelokugawa

then you get redirected to here:

http://www.monkeyclaus.org/media/audio/index.php?pageId=182

What I'd like is for the visitor to see what is on this page:

http://www.monkeyclaus.org/media/audio/index.php?pageId=182

And yet see this as their URL:

http://www.monkeyclaus.org/abelokugawa/

Is that possible?



0
Comment
Question by:lkrubner
2 Comments
 
LVL 10

Accepted Solution

by:
rivusglobal earned 300 total points
ID: 17807894
Hi lkrubner,


I think you could use Apache's mod_rewrite and add the following to your .htaccess file:

.htaccess:

Options FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} /abelokugawa
RewriteRule abelokugawa /media/audio/index.php?pageId=182
0
 

Author Comment

by:lkrubner
ID: 17815894
That seems to answer the question I asked, so I'll accept it.

All the image links are broken. Is that because I used relative links and the browser now thinks it is in a folder called abelokugawa?

http://www.monkeyclaus.org/abelokugawa
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
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.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now