Forum Moderators: phranque
However at the same time I'd like to keep links that go to specific existing pages working (ex. [mysite.com...]
Here's the .htaccess I wrote:
Options +FollowSymLinks +MultiViews
AddType x-mapp-php5 .php
RewriteEngine on
RewriteBase /
RewriteCond %{SCRIPT_FILENAME}!(\.[A-Za-z0-9]{2,4})$
RewriteRule ^(.*)$ /test/rw.php?p=$1 [L]
This seems to work well and treat URLs that end in a 2-4 character extension as regular pages and everything else as static-to-dynamic rewrites.
For example:
[mysite.com...] - gets sent to /test/rw.php?p=
[mysite.com...] - shows /index.php as desired
[mysite.com...] - gets sent to /test/rw.php?p=foo/bar/q/w/e/r
My problem is that:
[mysite.com...] gets sent to /test/rw.php?p=site/Contact.php instead of having that actual file shown.
Any ideas? Sorry if this is something very simple or obvious I'm just very very stumped why the rule works correctly for /index.php but not /site/Contact.php
RewriteCond $1 !\.[a-z0-9]{2,4}$ [NC]
RewriteRule ^(.*)$ /test/rw.php?p=$1 [L]
Jim