The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
I have seen two ways to establish a 301 redirect with htaccess.
Could you please tell me the operational difference between:
Redirect 301 / http://www.sitename.com
and
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$ http://www.sitename.com [r=301,nc]
Thanks.
Neil
I have seen two ways to establish a 301 redirect with htaccess.
Could you please tell me the operational difference between:
Redirect 301 / http://www.sitename.com
and
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$ http://www.sitename.com [r=301,nc]
Thanks.
Neil
mod_rewrite has much more advanced functionality which I will not go into now, but in this case both your RewriteRule and Redirect directives are triggering external 301 redirects.
N.
for example
Redirect 301 / http://www.sitename.com/subfolder
to redirect from htdocs to subfolder
I can't seem to get it to work
I've just tested this for you - from 1 subfolder to another as I don't want to wreck my live site ;¬)
www.hmmm.ip3.co.uk/find takes you to /search.
I'm using the second code example:
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$ http://www.hmmm.ip3.co.uk/search/ [r=301,nc]
Let me know how far you get or where it goes wrong.
[s]Hmmm...[/s]
Freeola error page:
"Error 500 running a script"
Are you happy with the format of your .htaccess file?
Are you on Standard or VIP hosting?
Where are you placing your .htaccess file? Perhaps try a test like mine going from folder>folder
EDIT
NB
.htaccess is powerful stuff and can cause problems! So make sure your FTP client can remove the file if it all goes pear shaped ;¬)[s]Hmmm...[/s]
I am on standard hosting, although I thought this would not be an issue
I am going to try to do this from php instead, or failing that, I will just have to reorganise my folders
I am using filezilla to upload so no problem to remove a dodgy htaccess file but thanks for the warning!
here's what worked in case anyone's interested:
index.php containing ONLY the following:
header('Location: http://www.yoursite.com/
?>