|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Why not just use one php page, index.php, and use SSI, so all pages would
be... http://www.blahblah.com/index.php?page=whatever Like: <?php if (isset($_GET['page'])) { $request = $_GET['page']; if ($request == "main") { include("main.php"); } else if ($request == "faq") { include("faq.php"); } else { include("main.php"); } } else { include("main.php"); } ?> With that, you can staticly define what pages exist. Followed by the first 'else', if the page doesn't exist it loads up 'main.php' in to the page. Or if the ?page=whatever is missing, it loads up main.php. <cancuen@gmail.com> wrote in message news:1158781106.188397.65430@i3g2000cwc.googlegrou ps.com... > First: hello. I'm new in this group, and I'm a php programmer and not > know much about conf or ht files in Apache, for what i read in the > manual. > Second. I have joined this group, because have an issue to know. > > I'm a php programmer and for some sites, it's needed to all the pages > requested, goes actually to be parsed into one sole page. This for > security reasons mostly. The question I have is: how redirect any page > (extesion especific, name specific, etc) to be parsed in one specified > without making any changes into users navigation bar, or send an error > (eg. 404) for not finding the page, or so. The quierystrings and/or the > directories, etc., I can handle with php. > > The thing is that might be possible with mod_rewrite, but, to work > correctly, and not slow or with some issues that the manual says. How > ever that souldn't be so difficult 'cause are regexp, buet not all > Server Admins will let me, 'touch' their conf files. > > I't have to be a .htaccess or similar way to do that. > > Thanks for your attention, and in advance for any or ideas > provided. > > Mario Soto > mariosoto@cancuen.net > ..._ > |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
cancuen@gmail.com wrote:
> The thing is: > http://www.example.com/rock/metallica >>> to be parsed as directory when no exists>> > http://www.example.com/index.php?gen...roup=metallica > > How ever all the string that follows the .com in this example I can > make what ever I wanted with regexp, not only turn into some variables. > What I want is to any page would be parsed with one specified page > (except images by example, or zip files, or...). > > BlackSpider wrote: >> Why not just use one php page, index.php, and use SSI, so all pages would >> be... >> >> http://www.blahblah.com/index.php?page=whatever >> >> Like: >> >> <?php >> if (isset($_GET['page'])) { >> $request = $_GET['page']; >> >> if ($request == "main") { include("main.php"); } >> else if ($request == "faq") { include("faq.php"); } >> else { include("main.php"); } >> >> } else { include("main.php"); } >> >> ?> >> > How about using the POST instead of the GET variables,.. and read a menu from xml or soomthing like that,.. anyways it's a php issue,.. apache will NOT do POSTS etc for you in this way to have only "seemingly" one page apache does not handle menu structures for you. Pete |
|
![]() |
| Outils de la discussion | |
|
|