Forum Moderators: phranque

Message Too Old, No Replies

htaccess problem

         

zulufox

2:12 am on Apr 7, 2004 (gmt 0)

10+ Year Member



I wanted to redirect 2 old urls to their new locations using the htaccess file..

1. I openned the htaccess in notepad and added:

Redirect [example.com...] [example.com...]

Redirect [example.com...] [example.com...]

and saved it as htaccess.txt in ASCI mode.

Then I uploaded it using cuteftp.

However when I went to: [example.com...]

my site did not redirect it but sent me to the same url as above.

Any suggestions?

Birdman

2:20 am on Apr 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just log in with your ftp and change the filename to .htaccess

No .txt or any other extension. Your ftp may 'hide' the file after you change the name. If so, type the command -al and press enter(at least that's what I do).

Birdman

jdMorgan

2:30 am on Apr 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I believe there are two problems:

First, redirect takes a URL-path (local path) on the left and a full URL on the right:

Redirect /aspbite/categories/index.asp?intCatID=163 [example.com...]

And secondly, Redirect is not aware of query-strings appended to the URL, and so can't test them.

However, you can do your query-string redirect with mod_rewrite, if it's available on your server.

Jim

zulufox

2:37 am on Apr 7, 2004 (gmt 0)

10+ Year Member



thanks... it works now

Birdman

3:07 am on Apr 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks JD. Both of those items were in my head but I wasn't positive so I chose to not advise on it, since I mainly use mod_rewrite. You're on the money, as usual.

Birdman