I'm building a site with multiple versions of the same page. So if the user goes to example.com/?u=user1, they get a custom branded version of the home page using JS which determines the query string and matches that to an image.
My question is how can I get the user to be able to visit example.com/user1 or example.com/start/user1 rather than the query string URL? Is there any way to do this?
I've tried rewrites but it isn't working:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^start/([^/]+)/?$ /?u=$1 [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/start [NC]
RewriteRule . /index.php [L]
Any help would be appreciated!