Jump to content

Simple regexp help


play_

Recommended Posts

I edited my post to replace the .\php with .php Not sure if that makes a difference or not...(Am I right in assuming you need to find urls that include a file.. in other words, something slash(/) something? As I could see an issue if the url is say www.example.com. What you want is to add .php at the end, but in that case, the url wouldn't make sense - www.example.com.php)

 

Perhaps:

RewriteRule ^([^/]+/?)+$ $1.php [L]

 

While I am familar with regex, I'm not with this kind of stuff. And it's late for me.. so working on stuff while tired certainly doesn't lend well either I'm afraid. You can give that last sample a shot, but I'm convinced it can be better.. Time for me to turn it in for the night.. Hopefully youi find the solution if none of these work out.

Link to comment
https://forums.phpfreaks.com/topic/152932-simple-regexp-help/#findComment-803185
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.