Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 01-05-2018, 05:42 AM   #1
LQ Newbie
Registered: Jan 2018
Location: Nepal
Posts: 1

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

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,

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

1. When i enter a site, say, it gets redirected to localhost but the url bar still says How to make it change to localhost in url too.
2. gets redirected but doesn't. why?

my /etc/dnsmasq.conf is:

/etc/dhcpcd.conf is:

interface wlan0
    static ip_Address=
    static domain_name_servers=
/etc/resolv.conf is: generated by resolvconf

/etc/hosts is :

Code:    localhost    raspberrypi (name of site i created)
Any help will be greatly appreciated. Thanks!
Old 01-07-2018, 03:30 AM   #2
Senior Member
Registered: Mar 2012
Posts: 1,650

Rep: Reputation: 438Reputation: 438Reputation: 438Reputation: 438Reputation: 438
Maybe have a default vhost (that answers to any name) on your Pi with a redirect to the site on a named vhost.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect http requests angle2009 Linux - Networking 6 12-18-2009 06:08 PM
Redirect outgoing http requests with IPtables highllamas Linux - Security 1 06-17-2009 09:07 AM
How do you properly redirect all web client requests from http to https? mehoggan Linux - Server 4 06-02-2009 04:49 AM
redirect all http requests to a different squid proxy server r2d2#jedi Linux - Networking 1 05-27-2009 01:31 AM
redirect some http requests to port 443. FMH Linux - Software 5 09-17-2007 09:19 AM > Forums > Linux Forums > Linux - Distributions > Debian

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration