I 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:
Code:
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:
Code:
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
Code:
nameserver 127.0.0.1
/etc/hosts is :
Code:
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!