GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   htaccess 301 redirection...help (https://gfy.com/showthread.php?t=859271)

klinton 10-03-2008 05:43 AM

htaccess 301 redirection...help
 
Hey , I want to redirect all traffic that goes to some directory to another url...
htaccess looks like this:
redirect / http://www.blabla.com/main.php?id=affiliate

and It redirects to url, but adds old directory name at the end of url...so it finally looks like http://www.blabla.com/main.php?id=af...ddirectoryname

how to avoid adding this old directory name to final url ?

Thanks !

Antonio 10-03-2008 05:59 AM

Code:

redirect 301 /OLDDIRECTORY/ http://www.MYSITE.com/NEW_DIR/SOMETHING.HTML

should work ^^^

klinton 10-03-2008 06:05 AM

Forbidden
You don't have permission to access /test/ on this server

Antonio 10-03-2008 06:24 AM

Quote:

Originally Posted by klinton (Post 14848933)
Forbidden
You don't have permission to access /test/ on this server


just tested the code on one of my servers, works 100%

where do you place your htaccess?

if your site is
Code:

http://www.mysite.com/OLDIRECTORY/
then your htaccess should be in the root directory

if still doesn't work coctact your host, dunno

klinton 10-03-2008 06:32 AM

I placed in it subdirectory...:)

Well Thanks anyway,I'll set up redirection via php...don't want to mess with htaccess too much ;]


All times are GMT -7. The time now is 06:44 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123