How to redirect all http-requests from devices connected via AP to localhost or the static ip address of rpi?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












have created a website which has plenty of movies/songs using laravel framework and apache server in Raspbian Stretch.



Also, I have configured rpi as an AP and i want to redirect all http-requests from devices connected via AP to the localhost or the address of pi.



After searching for days, i have made some requests to redirect by adding the line address=/#/ip_address_of_pi in /etc/dnsmasq.conf. But it doesn't redirect all requests like youtube.com, facebook.com



I have series of other questions related to this which are:



  1. When i enter a site, say google.com, it gets redirected to localhost but the url bar still says google.com. How to make it change to localhost in url too.

  2. google.com gets redirected but google.com/someaddress doesn't. why?

my /etc/dnsmasq.conf is:



interface=wlan0
listen-address=192.168.1.2
dhcp-range=192.168.1.3,192.168.1.23,255.255.255.0,12h
address=/#/192.168.1.2


/etc/dhcpcd.conf is:



interface wlan0
static ip_Address=192.168.1.21
static domain_name_servers=192.168.1.2 127.0.0.1


/etc/resolv.conf is: generated by resolvconf



nameserver 127.0.0.1


/etc/hosts is :



127.0.0.1 localhost
127.0.0.1 raspberrypi
127.0.0.1 www.mysite.com (name of site i created)


Any help will be greatly appreciated. Thanks!







share|improve this question




















  • Google "transparent proxy".
    – dirkt
    Jan 5 at 11:02














up vote
0
down vote

favorite












have created a website which has plenty of movies/songs using laravel framework and apache server in Raspbian Stretch.



Also, I have configured rpi as an AP and i want to redirect all http-requests from devices connected via AP to the localhost or the address of pi.



After searching for days, i have made some requests to redirect by adding the line address=/#/ip_address_of_pi in /etc/dnsmasq.conf. But it doesn't redirect all requests like youtube.com, facebook.com



I have series of other questions related to this which are:



  1. When i enter a site, say google.com, it gets redirected to localhost but the url bar still says google.com. How to make it change to localhost in url too.

  2. google.com gets redirected but google.com/someaddress doesn't. why?

my /etc/dnsmasq.conf is:



interface=wlan0
listen-address=192.168.1.2
dhcp-range=192.168.1.3,192.168.1.23,255.255.255.0,12h
address=/#/192.168.1.2


/etc/dhcpcd.conf is:



interface wlan0
static ip_Address=192.168.1.21
static domain_name_servers=192.168.1.2 127.0.0.1


/etc/resolv.conf is: generated by resolvconf



nameserver 127.0.0.1


/etc/hosts is :



127.0.0.1 localhost
127.0.0.1 raspberrypi
127.0.0.1 www.mysite.com (name of site i created)


Any help will be greatly appreciated. Thanks!







share|improve this question




















  • Google "transparent proxy".
    – dirkt
    Jan 5 at 11:02












up vote
0
down vote

favorite









up vote
0
down vote

favorite











have created a website which has plenty of movies/songs using laravel framework and apache server in Raspbian Stretch.



Also, I have configured rpi as an AP and i want to redirect all http-requests from devices connected via AP to the localhost or the address of pi.



After searching for days, i have made some requests to redirect by adding the line address=/#/ip_address_of_pi in /etc/dnsmasq.conf. But it doesn't redirect all requests like youtube.com, facebook.com



I have series of other questions related to this which are:



  1. When i enter a site, say google.com, it gets redirected to localhost but the url bar still says google.com. How to make it change to localhost in url too.

  2. google.com gets redirected but google.com/someaddress doesn't. why?

my /etc/dnsmasq.conf is:



interface=wlan0
listen-address=192.168.1.2
dhcp-range=192.168.1.3,192.168.1.23,255.255.255.0,12h
address=/#/192.168.1.2


/etc/dhcpcd.conf is:



interface wlan0
static ip_Address=192.168.1.21
static domain_name_servers=192.168.1.2 127.0.0.1


/etc/resolv.conf is: generated by resolvconf



nameserver 127.0.0.1


/etc/hosts is :



127.0.0.1 localhost
127.0.0.1 raspberrypi
127.0.0.1 www.mysite.com (name of site i created)


Any help will be greatly appreciated. Thanks!







share|improve this question












have created a website which has plenty of movies/songs using laravel framework and apache server in Raspbian Stretch.



Also, I have configured rpi as an AP and i want to redirect all http-requests from devices connected via AP to the localhost or the address of pi.



After searching for days, i have made some requests to redirect by adding the line address=/#/ip_address_of_pi in /etc/dnsmasq.conf. But it doesn't redirect all requests like youtube.com, facebook.com



I have series of other questions related to this which are:



  1. When i enter a site, say google.com, it gets redirected to localhost but the url bar still says google.com. How to make it change to localhost in url too.

  2. google.com gets redirected but google.com/someaddress doesn't. why?

my /etc/dnsmasq.conf is:



interface=wlan0
listen-address=192.168.1.2
dhcp-range=192.168.1.3,192.168.1.23,255.255.255.0,12h
address=/#/192.168.1.2


/etc/dhcpcd.conf is:



interface wlan0
static ip_Address=192.168.1.21
static domain_name_servers=192.168.1.2 127.0.0.1


/etc/resolv.conf is: generated by resolvconf



nameserver 127.0.0.1


/etc/hosts is :



127.0.0.1 localhost
127.0.0.1 raspberrypi
127.0.0.1 www.mysite.com (name of site i created)


Any help will be greatly appreciated. Thanks!









share|improve this question











share|improve this question




share|improve this question










asked Jan 5 at 10:29









AB pacino

1




1











  • Google "transparent proxy".
    – dirkt
    Jan 5 at 11:02
















  • Google "transparent proxy".
    – dirkt
    Jan 5 at 11:02















Google "transparent proxy".
– dirkt
Jan 5 at 11:02




Google "transparent proxy".
– dirkt
Jan 5 at 11:02















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414960%2fhow-to-redirect-all-http-requests-from-devices-connected-via-ap-to-localhost-or%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414960%2fhow-to-redirect-all-http-requests-from-devices-connected-via-ap-to-localhost-or%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?