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
170 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Service "nameserver" appears to be down 4 664
phpPgAdmin problem 14 230
Logs to delete in Windows VCenter server ? 11 1,064
RewriteRule in .htaccess file not working 8 58
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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