LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hide IPv6 address in URL. (https://www.linuxquestions.org/questions/linux-newbie-8/hide-ipv6-address-in-url-904977/)

BernardLinux 09-25-2011 09:39 PM

Hide IPv6 address in URL.
 
Hello, i am configuring Apache on CentOS and what i want to do is to hide the ip address whenever the user inserts IP address to view my web. lets say my website ip addr is 172.16.40.86 and its domain name is example.com.

the thing is, when i input
Code:

http://172.16.40.86
the IP address will stay there and i want it to be hidden and tell apache to automatically change it
Code:

http://example.com

here, i used this lines
Code:

RewriteEngine On
    RewriteCond %{HTTP_HOST} ^172\.16\.40\.86

Now, the problem is, how can i do it for IPv6 address?
Please help. thanks

EricTRA 09-26-2011 12:33 AM

Hello,

Please don't double-post your question/problem. That will only confuse you and us on to where the conversation is taking place. Stick to one thread per question. I've reported your other thread since it's a duplicate of this one.

Kind regards,

Eric

EricTRA 09-26-2011 12:39 AM

Hello,

What's keeping you from writing the same condition for your IPv6 address? You did it for the IPv4 one, so it's just another regex in my opinion. Did you try it? Sounds only logical to me that if you can write a regex to change the IPv4 that you could use the same for the IPv6 version.

Kind regards,

Eric

BernardLinux 09-26-2011 01:18 AM

Thanks for reminding. i thought i posted on two threads so i can get fast and more replies. sorry.

yea i did it for IPv4, and im just wondering how to do it for ipv6? because it is my task given by my supervisor to test Apache using IPv6 and if i know extra knowledge about this mod_rewrite method, it would be helpful.

thanks.

Regards,
Bernard.


All times are GMT -5. The time now is 12:12 AM.