Paul in South Africa

msg:1497396 | 10:08 am on May 14, 2004 (gmt 0) |
Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME}!index\.html RewriteRule (.*) [site.com...] [R=301,L] Should work.
|
jdingley

msg:1497397 | 10:12 am on May 14, 2004 (gmt 0) |
I put the following into htaccess: Order Deny,Allow Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME}!index\.html RewriteRule (.*) [mysite.com...] [R=301,L] I get internal server error for any url to that site
|
jdMorgan

msg:1497398 | 2:36 pm on May 14, 2004 (gmt 0) |
jdingley, Welcome to WebmasterWorld [webmasterworld.com]! You'll need to add a required space preceding the "!" in the RewriteCond. Posting on this board invokes a filter that removes "extra" spaces, and our code falls victim to it. The work-around is to type two spaces. Also, you won't need the "Order" directive, unless you have subsquent "Allow from" and/or "Deny from" directives. I've occasionally used something like this:
Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_URI} !^/index\.html$ RewriteRule (.*)\.html$ http://www.mysite.com/index.html [R=301,L]
Note that only requests for html pages are redirected to index.html. Otherwise all requests, including those for images and scripts, would be redirected to index.html. Jim [edited by: jdMorgan at 2:44 pm (utc) on May 14, 2004]
|
jdingley

msg:1497399 | 2:43 pm on May 14, 2004 (gmt 0) |
That did it. I put the above code in by cutting and pasting. Thanks very much!
|
jdMorgan

msg:1497400 | 2:45 pm on May 14, 2004 (gmt 0) |
We cross-posted - See my edit above. Also, see this thread [webmasterworld.com] for a related issue. Jim
|
|