08.01
php
SPFHelper
Note
SPFHelper did not leave a note
SPFHelper did not leave a note
- Hi all,
- I am bogged on some PHP coding and I am hoping someone here could help me please.
- What I am trying to do is this:
- My URL ---> http://www.123domain.com/?ref=12345
- Destination URL ---> http://www.456domain.com?id=12345&url=http%3A%2F%2Fwww.789domain.com%2F
- I also tried using .htaccess and it works for redirecting, but I can't seem to add the ?ref=12345 and convert it to id=12345.
- Using .htaccess, I tried the following:
- /456.php "http://www.456domain.com?id=<?php echo $keywordget; ?>&url=http%3A%2F%2Fwww.789domain.com%2F"
- If I could use .htaccess to do it all I would as then I only need 1 file for everything, and the redirect files are all aliases because the .htaccess would redirect them immediately.
- I have tried a few things as well and I am still stuck. For example, I have used the following code to extract the 12345 part:
- <?php
- $ref = $_GET['ref'];
- $ref = urlencode($ref);
- ?>
- Now, the above code works perfectly on the same page, meaning, if I put <?php echo $ref; ?> on the page, it will display "12345". What I am trying to do though is redirect and keep the 12345 in the redirected URL.
- Thanks,
- SPFHelper
Parsed in 0.042 seconds, using GeSHi 1.0.7.14