I have a really convoluted website that I need to work on. I was thinking on creating a single "home" php file that includes the main stuff (menu, sidenav, head, etc) and inserting the content for every page. I already have the content from all the pages separated so I have a duplicate of the site where all the html files have only the inner content ( i mean no , no menues, nothing except for the content). I would like to know if there is a way to redirect from any link that looks like www.site.com/example.html to www.site.com/script.php?url=example . That way, I can use the variable to insert the content files, or is there any other way to do such a thing?
mod_rewrite is a pretty common practice these days, no? As long as he doesn't mean a literal url as the PHP $_GET variables, he can validate the parameter against a list of verified strings. Pretty standard stuff in most frameworks.
Mike Sherov
2010-07-29 22:55:54
I just want to do that so i dont have to change every link on 500+ html files... so Im looking for a way to server redirect every link that goes to "site.com/something/hello.html" and bring up "site.com/script.php?url=something/hello(.html)" I can do some url rewriting after to hide the script.php... but my main concern if it can be done
Bruno
2010-07-29 23:02:08
Wrikken
2010-07-29 23:02:14
A:
Bruno
2010-07-31 04:10:04