Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- htaccess redirect, mod_rewrite...
February 3, 2007, 1:02 am
rate this thread
I got a problem getting all redirects done as i wish.
I've managed to get the old urls to redirect to new urls, discard the
first 0 or 00 in the variable number (001 -> 1 and 010 -> 10) so
domain.tld/directory/255 redirects to domain.tld/directory/index.php?
domain.tld/directory/255/ redirects to domain.tld/directory/index.php?
This is the line I have currently in my .htaccess
RewriteRule ^0*([0-9]+)/?$ index.php?file=$1 [L]
The problem itself is, that the ...directory/255/ redirects to
...index.php?file=255/ and I need the / to be removed from the
new target url end because that is not working with the php code on
All I've found was a way to add the / (or anything else) in the end of
the new url, but not remove it.. You guys got any ideas ?
If I posted this in the wrong group, please advice me of correct group
and set the follow-ups properly.
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum