I have a honeypot running on AP so if anyone connects and try's to browse it will redirect to the root page. I am using dnsmasq to do this with the following entry
log-facility=/var/log/dnsmasq.log
address=/#/10.0.0.1
interface=wlan0
dhcp-range=10.0.0.10,10.0.0.250,12h
no-resolv
log-queries
This works fine if someone were to go to http://example.com
but if they try http://example.com/somerandompage.html
I get a 404
error or if they try https://example.com
it just times out.
What would be the best method to redirect everything to http://serverip/index.html
while still allowing http://serverip/someOtherPage?with=options.html
with a preference for .htaccess solution.
http://example.com/somerandompage.html
at the same time ashttp://example.com
?