PHP redirect

you can't do it without using .htaccess
or maybe you will have to crate a html file name "weight loss"
and write content inside file:
<script type="text/javascript">
location.replace"/?key=weight loss";
</script>
 
Nope, without htaccess you cannot do the rewrite part to get the keyword in the URL.
The htaccess you need is only a couple of lines long and you are away :)

EDIT: Here is the htaccess you will need:
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?key=$1 [L]

And then in your index.php file, have something like:
Code:
<php
$key = $_GET['key'];
header("Location: http://your.domain.com/index.php?key=$key");
?>

Something like that anyways
 
Last edited:
Back
Top