Jump to content

Redirect from URL to php script.


DataRater

Recommended Posts

Please help me.

 

I'm using Apache 2 and PHP 5

 

I want to redirect a URL straight over to a php script and take everything after the web address as a parameter to the php file.

 

So I'm trying to do this and it doesn't work.

 

RewriteRule ^([./]*)$                  /XYZxyz.php?url=$1  [R=301,QSA,L]

 

e.g.

www.Website.com/News will send ---> XYZxyz.php?url=News

another example

www.Website.com/News/Today will send ---> XYZxyz.php?url=News/Today

 

Please help me work out the ReWrite rule.

 

Best wishes

 

Stephen

 

 

 

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.