Jump to content

Mod-rewrite Regular Expression Query


ProblemHelpPlease

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...