|
Joined: Jan 2007
Posts: 170
Member
|
Member
Joined: Jan 2007
Posts: 170 |
In the redirect version of ultimatebb.cgi to redirect from Classic 6.72, I need to use the choice...
# 0 - Don't send a 301/302 header, my webserver does this. (Enable this if 301/302 results in an ISE or blank page)
... When this is selected, a 302 redirect results. I would like to change this to a 301 - does anyone know how I would do this?
UBB user since 1998
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
If you want to use a 302 redirect, change the redirect line: $redirect = 302;
If you don't want to use one, you'll need to comment out the redirect codes (keep in mind i'm using an old version, and i am not sure if the latest build doesn't allow you to turn it off with a simple tick).
|
|
|
|
Joined: Jan 2007
Posts: 170
Member
|
Member
Joined: Jan 2007
Posts: 170 |
Apparently the "0 - Don't send" choice is used when $redirect=301 (or 302) returns a blank page.
Since I get a blank page in the browser when I use that $redirect=301 setting, I am trying the "0" setting - "Don't send a 301/302 header, my webserver does this. (Enable this if 301/302 results in an ISE or blank page)" setting.
It works- there is a redirect and no blank page. The problem is that it is a 302 redirect which is not search engine friendly so I would prefer to use a 301.
What I need to know is how I go about making that change so using the "0"' setting results in a 301 redirect instead of a 302.
UBB user since 1998
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
Some web server pre-send a header with cgi files; which makes it so you can't set a forward type in the header; it's really quite odd; basically just disable the sending of any header type in the cgi importer.
|
|
|
|
Joined: Jan 2007
Posts: 170
Member
|
Member
Joined: Jan 2007
Posts: 170 |
I just simplified - I redirected in .htaccess
UBB user since 1998
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
Well, I guess that would work if you just want to redirect requests; the key thing of the importer is to use the import map to redirect incoming users to the proper threads.
|
|
|
|
Joined: Jan 2007
Posts: 170
Member
|
Member
Joined: Jan 2007
Posts: 170 |
With search engines nowadays, a 302 redirect creates more problems than it solves. A 301 is far better even without users being redirected to the proper threads. That will only be short term as with a 301 search engines will soon spider the new urls and drop the old. That doesn't happen with 302 and that affects the ranking of the new urls (and ultimately the new board).
UBB user since 1998
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
You should have been around when we where argueing about the redirectors lol; specifying them in the file was the only real solution ...
|
|
|
2 members (Ruben, ahmed047),
776
guests, and
161
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|