Jump to content

Header Location Redirect + Mod Rewrite


shanejeffery86

Recommended Posts

Hey all.

 

I currently am redirecting to another PHP file via a header redirect.  Upon that header redirect, I need a rewrite to be done.

 

How do I do this?

 

header("Location: armory.php?profileID=" . $profileID);
exit;

 

Hits the armory page and then this rule takes affect in the .htaccess file:

 

RewriteRule wow-armory-profile/(.*) armory.php?profileID=$1

 

Is it even possible to do this?  If not, please let me know and as I am going to have to move around quite a lot of code to make this work correctly for rewriting.

Link to comment
Share on other sites

Hey Alex.

 

The problem with that is that location does not correspond to anything.  I want the armory.php to be hit when the Location you have listed is hit ("Location: wow-armory-profile/" . $profileID).  How do I go about doing that?

 

So, when I redirect to "wow-armory-profile/" . $profileID", I want the armory.php to recognize that it needs to run, but I want to keep the URL as "wow-armory-profile/" . $profileID".

 

I painted myself into quite a corner here and having trouble getting out.

 

Thanks.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.