ProblemHelpPlease Posted August 5, 2009 Share Posted August 5, 2009 I am trying to use mod-rewrite (not used it before) to change address fromhttp://www.domain.com/file.php?variable1=u...ble2=atozstringtohttp://www.domain.com/folder/urlencodedstringatozstring or http://www.domain.com/folder/urlencodedstring (if possible)I have having difficulty with getting the correct regular expression as variable 1 is a mixed up jumble of characters due to it being urlencoded and is never in the same format ( the only thing thats the same is it only contains urlencoded characters ). All the examples always have something like id=123 or name=bobCan anyone offer a solution. Link to comment Share on other sites More sharing options...
ProblemHelpPlease Posted August 5, 2009 Author Share Posted August 5, 2009 I am currently using the code below, but am now having problems with the url encoded characters like %26 not working in my script as they are being read as chracters rather than being passed encoded, any ideas? RewriteEngine OnRewriteRule ^(.+)/([a-z]+)/?$ file.php?variable1=$1&variable2=$2 Link to comment Share on other sites More sharing options...
ProblemHelpPlease Posted August 5, 2009 Author Share Posted August 5, 2009 Ok, now found out that the urlencoded string cant be passed through the modrewrite due to a bug, I have tried the double urlencoding of the string but wondered if anyone has a better solution Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.