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

Pages: 1-

.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-23 21:03

This board is for programmers only.  Demonstrating your failure to understand program behavior on the simplest level does not make for a good debut.

Name: Anonymous 2010-09-23 22:09

>>2 here
Duh, I forgot: you're anonymous... Oh, wait! I'm, too! That means I can do whatever the fuck I want! Like posting about how big my dick is. It's 9 inches, bitches! (It's not that big. I lied to make this post sound funny. I can because I'm anonymous. Hell, we all are!)

Name: Anonymous 2010-09-23 22:15

>>3
You're not improving your case one bit.  Please leave.

Name: ßussman 2010-09-23 22:31

>>3
But I can tell the difference between you and him because you are at the back of the bus.

Name: Anonymous 2010-09-24 2:21

>>3
your post was not funny

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.

Name: Anonymous 2010-09-24 18:33

>>7

YOU HELPED HIM!

Name: Anonymous 2011-02-04 16:25

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