My web server currently runs Apache 2.0. What I would like to do is to direct certain visitors to my website to slightly altered pages which have different content from what a standard visitor would see.
For example, if everyone clicks on the "WhatWeDo" button, they will be presented with the whatwedo.html page, however if a visitor is from a specific IP address, then I would like to transparently direct them to whatwedo2.html, which will have a slightly different version of the page content.
As I am new to Linux and all of this stuff I am having some problems. Is it correct that I need a .htaccess file to implement this?
I have been playing with the following .htaccess code:
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} 1\.1\.1\.1 [OR]
RewriteCond %{REQUEST_URI} /sub_dir1/index/.html$
RewriteRule .* /sub_dir2/index.html [R=301,L]
Is this code even close to what I am trying to do?
Also can someone confirm for me how exactly to go about uploading a file from my Windows Documents folder to the Apache server as I am unsure of the code involved here.
I have read that the mod_rewrite module needs to be enabled to allow this using a .php file. I am pretty sure this is enabled however when I have tried accessing the link from various IPs I am getting various error messages (can't remember what they are right now).
Again I am new to all off this so any help would be greatly appreciated.
Thanks