I have a test version of Apache 1.3.33 running on my xp machine. I need to get mod_rewrite working. The rewrite code is code I have used successfully on LAMP servers many times and I am sure it is good.
In my httpd.conf file I have:
LoadModule rewrite_module modules/mod_rewrite.so
and...
I am getting an Apache generated page that points to the actual page. I am not getting the actual page that I redirected to. On the Apache page I get a link that you have to click to go to the actual page that I redirected to.
This is not part of any tight security thing. It is a site that...
I have used header statements for redirects before with good results. The code:
if (!isset($_COOKIE['State']) and !isset($_SESSION['State'])){
ini_set('session.use_trans_sid', true);
$_SESSION['Page'] = $_SERVER['SCRIPT_NAME'];
setcookie("Page", $_SERVER['SCRIPT_NAME'], time() + (60*60))...
I am using header in PHP to redirect if certain cookies are not present. When I issue the header command instead of the page I should be getting I get this page:
*****************************************
Page title: 200 OK
Page contents:
OK
The document has moved here...
Would this be the correct way to exclude both index.php or missing.php?
RewriteCond %{REQUEST_URI} !index.php$|!missing.php
RewriteRule !^/index.php|!^missing.php /index.php
I have tried that and it seems to work.
Awesome! Thank for the help! I did have to change one thing, on the second line I added the ! to signal "not" index.php.
RewriteEngine On
RewriteCond %{REQUEST_URI} !index.php$
RewriteRule !^/index.php /index.php
By the way, what does the [R,L] do?
I have a mod rewrite that I need to do. What I want to do is redirect the entire site to the root index.php file. I have tried a few things that are totally screwed up. I believe that everything I try (like (.*) /index.php just throws the server into an infinite loop.
I need something like...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.