stabilizer
IS-IT--Management
Hi all,
I'm trying to make our site cleaner for search engines by eliminating ugly query strings but am running into some redirect issues. I have the following PHP code set up to link pages that are generated via a stroll throught the site:
header('location:'.$redirect);
Where redirect=
This is where it gets tricky! We then have a RewriteCond set up in our apache webserver that will take the request for /dir/id and redirect to but this is a pass through redirect so the URL in the browser should remain Apache config syntax:
# Rewrite engine
RewriteEngine on
Options +FollowSymLinks
RewriteRule ^dir\/([0-9]+)$ /page_id.php?i=$1 [PT]
Does this make sense? To basically recap, I'm using a header redirect in PHP to then call a RewriteRule in apache which redirects to another page but I want the apache redirect to happen behind the scenes and not change what is in the browser URL.
I'm running PHP 4.3.10, Apache 1.3.33 on Debian Sarge.
Thanks,
Greg
I'm trying to make our site cleaner for search engines by eliminating ugly query strings but am running into some redirect issues. I have the following PHP code set up to link pages that are generated via a stroll throught the site:
header('location:'.$redirect);
Where redirect=
This is where it gets tricky! We then have a RewriteCond set up in our apache webserver that will take the request for /dir/id and redirect to but this is a pass through redirect so the URL in the browser should remain Apache config syntax:
# Rewrite engine
RewriteEngine on
Options +FollowSymLinks
RewriteRule ^dir\/([0-9]+)$ /page_id.php?i=$1 [PT]
Does this make sense? To basically recap, I'm using a header redirect in PHP to then call a RewriteRule in apache which redirects to another page but I want the apache redirect to happen behind the scenes and not change what is in the browser URL.
I'm running PHP 4.3.10, Apache 1.3.33 on Debian Sarge.
Thanks,
Greg