Answer the question
In order to leave comments, you need to log in
Is it possible to change $_SERVER['REQUEST_URI'] in PHP via .htaccess?
Is it possible to write a rule where, for example, when going to example.com/page , the request was passed to example.com/index.php for processing and in index.php the $_SERVER['REQUEST_URI'] variable was set to /other_page using .htaccess and not php?
Answer the question
In order to leave comments, you need to log in
The only thing that comes to mind is a construction like this:
.htaccess:
php_value auto_prepend_file "replaceuri.php"
replaceuri.php:
<?
$_SERVER['REQUEST_URI'] = 'other_page';
?>
True, it will only work with mod_php.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question