Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Lionsanime Directory   Improve your ranking, submit to directories   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 03-16-2007, 06:35 AM   #1 (permalink)
Inactive
 
Join Date: 09-16-06
Posts: 15
iTrader: 0 / 0%
Latest Blog:
None

recep is liked by many
redirecting ur old site to a new one with htaccess

hello friends, l want to redirect one of my old site to a new one with everything inside it, well l am planning to use htaccess for this one but l coulnt do it while l am using 404 pages after l closed the old site. they didnt work l dont know why.

Code:
Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.html
l found this code,

All l want to do, l want to redirect all of my pages, documents, txt files and everything inside my old site ( every single link ) to one page l want to refer on new site, well it would be better if l can do it with htaccess..

Can Anyone explain me how to ? Thanks..
recep is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 03-16-2007, 10:34 AM   #2 (permalink)
Inactive
 
Join Date: 02-15-07
Posts: 85
iTrader: 0 / 0%
Latest Blog:
None

atox is on the right pathatox is on the right path
Try this:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/onepage.html [R=301,L]
atox is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-16-2007, 03:41 PM   #3 (permalink)
Inactive
 
StupidScript's Avatar
 
Join Date: 09-22-06
Location: Los Angeles
Posts: 678
iTrader: 0 / 0%
Latest Blog:
None

StupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really nice
Are you not able to access the httpd.conf file directly? It's a much better place to put those kinds of instructions.

Note that in order to use .htaccess files your Apache server configuration for that directory should include the AllowOverride directive, unless the server operator has not changed the default behavior (AllowOverride All) for secutiry purposes (which they should have done). If they have included the AllowOverride directive for your directory, then it should be set to a minimum of FileInfo in order for Apache's mod_rewrite to be allowed to handle the rewrite instructions.

Minimum server config entry to allow use of .htaccess and mod_rewrite:
<Directory "/var/www/home/user">
AllowOverride FileInfo
</Directory>

Better:
<Directory "/var/www/home/user">
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/onepage.html [R=301,L]
</Directory>
StupidScript is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-29-2007, 05:03 AM   #4 (permalink)
Inactive
 
Join Date: 09-16-06
Posts: 15
iTrader: 0 / 0%
Latest Blog:
None

recep is liked by many
thanks for your comments friends, very helpfull
recep is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess blocking ONE file and Redirecting it? homebrewpcgaming Coding Forum 2 07-11-2008 05:53 PM
Redirecting site. shahab6 SEO Forum 10 12-10-2007 01:17 AM
Site Restructure - can I do 600 301 redirects in a .htaccess? bwb SEO Forum 2 09-28-2006 07:24 PM
[Linux]Password protect a web site directory using .htaccess QT_ Dedicated Servers 0 01-08-2004 08:07 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:45 AM.
© Copyright 2008 V7 Inc