Hi There, I have a .htaccess file that is passing a value through to a page. This is the file: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteEngine on RewriteRule ^([^/\.]+)/?$ page.php?seo_link=$1 My database stores a value called "seo_link" so when someone visits the page it displays like this - http://www.mysite/seo-link I have a varible i need to pass within this .htaccess file but i dont want it to display on the url above. The field within the database is called "treatment_id" and this needs to be hidden. I am happy to make a small paypal donation to someone who can help me! Regards Tom
At one time Nimrod had an excellent tutorial on this site about the voodoo known as mod rewrite. A little searching might find your answer for free. I can do the simple stuff but what you want might take time to figure out.
I don't exactly get it. You want a variable passed called treatment_id, but for it to NOT be in the URL? So the URL click would be example.com/seolink and what you want directed to the script is seolink?treatment_id=123 (as an example). Without 123 being in the URL, how is it supposed to be passed? Or is treatment_id either 1 or 0 depending upon the URL? For example, 1 if it's example.com/seolink and 0 if it's example.com? PS: If I do help you, please no donation - I'm doing it for free.
You could set this up using DNS maybe. Only way to do this would be to mask the address, AND use the variable. You can't pass along the variable, unless it's in the address..... So, example would be test.whatever.com leads to testcom/seolink?whatever=good&blah=yeah), so the user will only see test.whatever.com. Otherwise, why would you want to hide the variable? Also, you can try to encrypt the variable if it's an concern when being viewed.
is the treatment_id variable static or changing for each url? If it is changing there's no way to hide it..