Best practice for using "Redirect" in httpd.conf?

I work at a company where the IT department uses a lot of “Redirects” via the httpd.conf file in order to create shortcuts… Example:


...
...
...
Redirect /Foo http://www.site.com/folder/foo/index.php
...
...
...

In terms of SEO, bots, and just basic “best practice” techniques, should we be including some sort of 301?? Or, is the above totally kosher?

Thanks!

Mike,

It looks like you’ve gone a bit overboard (based on the example at apache.org).

Regards,

DK

Hi David!

Many thanks for the reply. :slight_smile:

Thanks for the apache.org link also… I should have looked there first.

So… It looks like we need to add “permanent”, otherwise it is just a temp 302:

Redirect permanent /Foo http://www.site.com/folder/foo/index.php

Makes sense… :goof:

Thanks a billion David!!!

Have a great day,
Cheers,
Micky

Micky,

Sorry, mate, I thought you were a “Mike.”

What I was calling overkill was that you were not merely redirecting the foo directory but redirecting it to a file (rather than another directory which would then serve the requested file from within that directory instead of the originally requested directory).

Hmmm, “[DK]” in your signature, eh? I am honoUred!

Regards,

DK

Hey DK!

Ah, I see what you mean now about overkill… Thanks for the clarification.

Thanks a billion for the pro advice! Your help has always been spot on!

Glad you do not mind me linking to your site… Your posts/feedback and website has helped me through some very rough times. :smiley:

Have a great day!
Cheers,
Micky

:blush:

Regards,

DK

Thanks dude…it is helpful to me as well…highly appreciated…

Hi DK,

Read quite a lot about you… Hope you or anyone else can help me here…

I am stuck in a problem. I want to add a footer on all files on my server on Hostgator.com Baby Croc package… But I cannot do it via htaccess. I am not familiar with Linux servers, mostly used Windows till now… This might be done through httpd.conf or php.ini… Don’t know… any help would be highly appreciated? Thanks in advance.

Lem,

If you don’t have access to .htaccess then you surely won’t have access to httpd.conf or php.ini.

What you’re looking for is the auto-append directive for PHP. It’s not a function of Apache but it is of PHP.

What I would do in your case (other than finding a better host/account) is to use PHP files and include the file you want to append in the footer.php file to close every php script. I typically use modules for html, header, masthead, {content} and footer in my php scripts.

Regards,

DK

Thanks a lot for your reply…

I have access to php.ini and httpd.conf… and even htaccess but I cannot use htaccess for some reasons…

I am looking for a way, so I don’t have to edit each and every file but the footer gets attached to all of them using httpd.conf or php.ini or anything else except htaccess. Let me know, if something like this is possible. Thanks a lot

Let me be more clear on my scenario and may be you have some idea, as you’re a pro…

Lots of people have access to public_html on my server… Only, I have access to the root folder and even there, I cannot play with htaccess due to some reasons… So, now, what I am looking for is someway that I can set-up footer on all my domains inside public_html, you see? If I put it inside, public_html, anyone can remove it and I cannot put htaccess in root folder. I need some other solution. I’ll be really greatful, if you can suggest me a solution to this… Thanks a million in advance…

I can access any folders above public_html… like, .cpanel, .gem, .htpasswords, etc, etc…

I am sorry, if this info sounds lame but I just thought to made it clear. Thanks.

UPDATE: I was told by hostgator that I cannot change httpd.conf… So, I need to find a solution through php.ini or something else…

I can use htaccess, if there is any possibility of hiding it or having in any other folder than root or public_html. Let me know. Thanks.