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
172 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
[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 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

630 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