Raisinlove a écrit :
Hi, I realize this isnt specificaly related to php, but most php
hi
developers are familiar with this.

My website uses an index.php file to load all content with a template, using urls like so:

http://www.foo.com/index.php?page=splash.html

In the same directory, there is a file called splash.html, but what I would like to do is that if the source file is called, the php file would load instead. So typing in:

http://www.foo.com/splash.html

would bring up:


http://www.foo.com/index.php?page=splash.html

instead.

The solution I found was to use an .htaccess file, but it only brings up a 403 forbidden access error everytime. ModRewrite is enabled, so what could be the problem? Here is the code I used:

RewriteEngine on
RewriteBase /
RewriteRule ^[A-Za-z0-9]\.html$ /index.php?page=$1
[A-Za-z0-9] will only match one character.

Try this :

 RewriteEngine on
 RewriteRule [A-Za-z0-9]+\.html$ /index.php?page=$1


thanks for your help :)

-steph


--
Fabrice Lezoray
http://classes.scriptsphp.fr
-----------------------------

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to