Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

htaccess help

Status
Not open for further replies.

Zeroanarchy

Technical User
Jun 11, 2001
630
AU
I hope this is the right forum, I am having real problems trying to divert one page to another in the htacess file. I am unable to make the divert happen on the page as it is part of a forum.

I have tried a few different combinations but I can not seem to get it to work.

I want to permanently divert

Code:
[URL unfurl="true"]http://forum.site.com/index.php?home[/URL]

to

Code:
[URL unfurl="true"]http://site.com[/URL]

Only that one page.

The .htaccess file is located in the folder. I did try placing it in the subforum but that did not work either.

Thanks in Advance


[afro]ZeroAnarchy
Experience is a wonderful thing. It enables you to recognize a mistake
when you make it again.
 
Thanks Billy I'll try over there.

Cheers


[afro]ZeroAnarchy
Experience is a wonderful thing. It enables you to recognize a mistake
when you make it again.

 
I use a ton redirects but they're all within the same site. I'm not certain how to go from from //forum.site to //site.

If I had to guess I'd say, on the htaccess file for forum.site try Redirect 301 /index.php?home

This is a good question for this forum because .htaccess file is by far the best way to redirect pages and necessary for creating error pages; you can create an error page in html and it will probably never behave as an error page without adding some code to the .htaccess file.
Adding codes to .htacces file is also needed inorder to get php to work on your HTML code. You would want to do this when you want the server to automatically change dates for you. If you have 100 pages that change all the time and each has Copyright _ _ _ _ , you really don't want to spend new years day changing those copyright dates by hand. A simple, very short piece of php code wil do it for you: <?php echo(date("Y")) ?> You'll have to ask your webhost what code has to be added to the .htacces file to get php to work inside HTML.
Jillq
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top