Forum Moderators: phranque
Excuse my lack of knowledge on the subject. I have created a .htaccess file which previously worked on a former host. I have since moved it to a cobalt raq with apache and it gives me a 500 message. The code I was formely using was this:
ErrorDocument 404 /404.asp
Redirect /brief.htm [mydomain.co.uk...]
For example. It is essential that I be able to somehow redirect incoming pages to the correct place or I will be severely marked down for SEO.
I read in a former post using htaccess to redirect to a PERL script called index.cgi, but I must confess I am not a PERL scripter and have no knowledge of how to do this or what I would need to do in order to get it to work.
If anyone has any examples they could show me or help in any way, links or anything, I would be eternally grateful.
Thanks
RewriteEngine On
RewriteRule ^index\.html$ [mydomain.co.uk...] [R=301,L]
but with the same results. :o(
AccessFileName .htaccess
and
AllowOverride All
I think the latter's set to AllowOverride None by default. You might want to put:
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
into your .htaccess file too, which will prevent third parties being able to access it.
Edit: Hmmm, except you're getting a 500 error, which suggests your .htaccess is working. Do you have anything else in the file apart from those two directives? Or did Longhaired Genius get it right first time about the file extensions - it's unusual to have .asp on an Apache box at all, let alone mixed in with PHP.