Web Hosting Talk







View Full Version : mod_rewrite & subdomain problem


Gryx
06-10-2007, 06:46 AM
I use mod_rewrite to make urls like page.php look like page.

This is in my .htaccess:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/(images|redirect)
RewriteRule ^([^.]+)$ $1.php

The first problem is that my subdomain isn't working anymore. I get an error that /.php is not found.

The second: I have a map called redirect with a index.html. In this index.html I make a redirect to an other website. If I go to the map it redirects, but when I go to the website i get the same /.php error.

Gryx
06-12-2007, 04:25 AM
No one can help me?

Jatinder
06-13-2007, 01:06 AM
Try this:


RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L]