Chuck Posted May 4, 2009 Share Posted May 4, 2009 Using Mac OS X Leopard Server's Apache, does anyone know if it's possible to take a URL like http://domain.com/1234 and reinterpret it so that it's executed as http://domain.com/index.php?param=1234, and if so, how I would go about it? Thanks, Chuck Link to comment Share on other sites More sharing options...
ectivate Posted May 29, 2009 Share Posted May 29, 2009 Hi Chuck, yes, this is possible. You can solve it with an .htaccess-file in the doc-root of your server. In the .htaccess you can do some rewriting-stuff like RewriteEngine on RewriteCond %{REQUEST_FILENAME} !.php RewriteRule ^/?([^/]*.html?|[^./]*)[;,.]*$ index.php?goto=$1 [L,NS] In this case the parameter after domainname.com/blabla will be passed as index.php?goto=blabla You have to enable "Allow all overrides" (I don't know how this is exactly called in an US-MAC OS) within Server-Admin / Web / Domain / Options. Otherwise .htaccess will be ignored. /horst Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5446 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now