httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Classen <Andrea.Clas...@emcdda.eu.int>
Subject Re: [users@httpd] mod rewrite
Date Tue, 16 Dec 2003 09:42:39 GMT
I'd guess something like

RewriteEngine On
RewriteRule ^(.*)\.php$  /view.php?arg=$1 [PT]

should work
Bye, Andrea

Ed Lazor wrote:

>Hello,
>
>Is it possible to redirect all site-wide php file requests to a single script?  Is it
possible to set this up as the root of the site?
>
>For example, if someone types:
>
>http://localhost/test.php
>
>a script that I specify gets called?
>
>We're moving a lot of pages into a database and will achieve a number of benefits in the
process.  Unfortunately, one drawback is that we lose previous naming conventions and end
up with odd URLs.
>
>In other words, we end up going from
>
>http://localhost/TheSuperStory.php
>
>to
>
>http://localhost/view.php?ID=234
>
>One idea is to have all php file requests go to a specific script and have it load documents.
 The script could then do a search in the database for the file name and display the proper
document.
>
>I'm not sure if I'm making sense here, but the script would process the url
>
>http://localhost/TheSuperStory.php
>
>and search the database for an article titled TheSuperStory and display it from the database.
>
>To play devil's advocate here...  would that be too much over head for mod_rewrite, php,
and mysql just for loading a page from the database?
>
>Thanks,
>
>-Ed
>
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>  
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message