Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

.htaccess redirection

Name: Anonymous 2010-09-23 20:54

RewriteCond %{HTTP_HOST} ^url.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.url.com$
RewriteRule ^dir$ "url2.com" [R=301,L]

When I open url.com/dir now, it shows up url2.com in the browser line. But I want that it redirects to url2.com but keeps showing url.com/dir in browser line, url2.com should be "hidden".

Is that possible?

Name: Anonymous 2010-09-24 2:44

>>1

Two ways of doing that come to my mind at this moment:

- By using subrequests in mod_rewrite. This requires you read the mod_rewrite manual and your application must not generate absolute links (http://... stuff), just relative ones, or be aware of this in order to generate them with the publicly visible URL.
- By using a proxy server. Apache could serve as one; nginx is lightweight and nice as one; Squid is a good proxy and cache.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List