2
Contributors
9
Replies
23
Views
4 Years
Discussion Span
Last Post by diafol
0

What URL are you expecting from your links and users? e.g. http://www.example.com/123456 ?

rewriting usually gets the better of me too. Have you checked the error log? Typically at:

apache/logs/error.log

Edited by diafol

0

Why not just change decode.php to index.php?

Like:

RewriteEngine On
RewriteRule ^([0-9]{6})$ /index.php?shorturl=$1 [L]

Edited by diafol

0

Did you check your logs?

//EDIT

This works fine for me:

RewriteEngine On
RewriteRule ^([0-9]{6})$ /product.php?shorturl=$1 [L]

Then in my product.php page:

<?php echo (isset($_GET['shorturl'])) ? 'ShortUrl: ' . $_GET['shorturl'] : 'No short url' ;?>

Which when I enter the address: www.example.com/123456 (not lierally - just my testing site) gives me the output:

ShortUrl: 123456

Edited by diafol

0

OK, sorry, I can't reproduce the error. Anybody else?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.