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.

Ezilon Directory   I Sell Pagerank   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 06-04-2007, 08:16 PM   #1 (permalink)
Inactive
 
Join Date: 06-04-07
Posts: 8
iTrader: 0 / 0%
Latest Blog:
None

modine is liked by many
.htaccess 301 redirect

Hi,

I need to redirect over one hundred pages to a new directory but can not find the right code. Could someone please help me. Everything I've done so far doesn't work only make the site unavailable all together.

Thanks,
modine
modine is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 06-04-2007, 09:34 PM   #2 (permalink)
Contributing Member
 
lordspace's Avatar
 
Join Date: 05-30-06
Location: Canada
Posts: 458
iTrader: 0 / 0%
lordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nice
Send a message via ICQ to lordspace Send a message via Skype™ to lordspace
how your pages look like ?
e.g. page1, page2 ?

I have a script that redirects to different links but you have to make the mappings.
lordspace is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-04-2007, 09:39 PM   #3 (permalink)
Inactive
 
Join Date: 06-04-07
Posts: 8
iTrader: 0 / 0%
Latest Blog:
None

modine is liked by many
Quote:
Originally Posted by lordspace View Post
how your pages look like ?
e.g. page1, page2 ?

I have a script that redirects to different links but you have to make the mappings.
what do you mean... how do my pages look
modine is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-04-2007, 10:37 PM   #4 (permalink)
Contributing Member
 
lordspace's Avatar
 
Join Date: 05-30-06
Location: Canada
Posts: 458
iTrader: 0 / 0%
lordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nice
Send a message via ICQ to lordspace Send a message via Skype™ to lordspace
what are you pages - PHP files ?
how do they look e.g.
http://domain.com/page4redirect.html -> http://domain.com/new/page4.html
http://domain.com/page4redirect.php -> http://domain.com/new/page5.html
lordspace is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-04-2007, 10:57 PM   #5 (permalink)
Inactive
 
Join Date: 06-04-07
Posts: 8
iTrader: 0 / 0%
Latest Blog:
None

modine is liked by many
Quote:
Originally Posted by lordspace View Post
I got the redirect to work for the one site. However now all pages including a couple other websites get redirected to this site, even though they're are not coming from the directory I'm redirecting. Any ideas on this?

modine
modine is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-04-2007, 11:16 PM   #6 (permalink)
Contributing Member
 
lordspace's Avatar
 
Join Date: 05-30-06
Location: Canada
Posts: 458
iTrader: 0 / 0%
lordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nice
Send a message via ICQ to lordspace Send a message via Skype™ to lordspace
would you paste contents of your .htaccess ?
lordspace is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-05-2007, 07:06 PM   #7 (permalink)
Inactive
 
Join Date: 06-04-07
Posts: 8
iTrader: 0 / 0%
Latest Blog:
None

modine is liked by many
here's the code

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.domain.com
AuthUserFile /www3/domain/_vti_pvt/service.pwd
AuthGroupFile /www3/domain/_vti_pvt/service.grp

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

Redirect 301 /store2/ http://www.domain.com/
modine is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-05-2007, 08:31 PM   #8 (permalink)
Contributing Member
 
lordspace's Avatar
 
Join Date: 05-30-06
Location: Canada
Posts: 458
iTrader: 0 / 0%
lordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nice
Send a message via ICQ to lordspace Send a message via Skype™ to lordspace
Put that below "RewriteCond"
RewriteCond %{REQUEST_URI} !somefile.php [NC] # we skip links containing somefile.php
lordspace is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-05-2007, 08:41 PM   #9 (permalink)
Inactive
 
Join Date: 06-04-07
Posts: 8
iTrader: 0 / 0%
Latest Blog:
None

modine is liked by many
thanks but can you explain a little more because i'm really am not sure what i'm doing. i don't know what you mean when you say put that below. that below what?
modine is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-05-2007, 10:11 PM   #10 (permalink)
Contributing Member
 
lordspace's Avatar
 
Join Date: 05-30-06
Location: Canada
Posts: 458
iTrader: 0 / 0%
lordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nice
Send a message via ICQ to lordspace Send a message via Skype™ to lordspace
when I put "!" in front of the file, this file gets excluded from mod_rewrite and there will be no redirect for it.
lordspace is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-05-2007, 10:28 PM   #11 (permalink)
Inactive
 
Join Date: 06-04-07
Posts: 8
iTrader: 0 / 0%
Latest Blog:
None

modine is liked by many
thank you but i'm still not sure how to input it. where you have somefile - do i replace that with a file? also what about the php, i don't believe any of my files are php files. i've been working on this for 2 days now and i am getting tired. seems like i'll never get it working.
modine is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-05-2007, 10:39 PM   #12 (permalink)
Contributing Member
 
lordspace's Avatar
 
Join Date: 05-30-06
Location: Canada
Posts: 458
iTrader: 0 / 0%
lordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nice
Send a message via ICQ to lordspace Send a message via Skype™ to lordspace
first, when you say that something is not working please give some details and even more examples.
Tell me what you expect to happen and then what really happens.

We, programmers, need as much info as possible because sometimes there are a lot of possible issues that may cause things not to work.
This is only my opinion and a little piece of advice.
lordspace is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-05-2007, 10:54 PM   #13 (permalink)
Inactive
 
Join Date: 06-04-07
Posts: 8
iTrader: 0 / 0%
Latest Blog:
None

modine is liked by many
it's hard to explain but here goes. i have 3 websites under the same root folder, just the other day i decided to move the files from the store2 folder to under the root folder and i did the redirect so visitors could find my site from old links online. this all works fine. 2 of the other folders under the root folder are separate domains that when typed in the address bar should bring the site in, however it's redirecting them to the first site since i made these changes. i'm not sure if it happened before the .htaccess was changed or because i moved files from store2 folder to the root. the site that's redirect correctly is watersportsproducts.com the 2 that are not coming in and are being redirect to watersportsproducts are johnkhadivi.com and westcoastmall.com. let me know if you need any more info and thanks again. modine
modine is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-12-2007, 12:11 AM   #14 (permalink)
Inactive
 
Join Date: 05-06-07
Posts: 85
iTrader: 0 / 0%
Latest Blog:
None

alainkun is a jewel in the roughalainkun is a jewel in the roughalainkun is a jewel in the roughalainkun is a jewel in the roughalainkun is a jewel in the roughalainkun is a jewel in the roughalainkun is a jewel in the rough
Send a message via MSN to alainkun
If you have diferent folders for each webpage you should add one .htaccess for each webpage. the oldest one folder have to redirect with .htaccess to the news one.
alainkun is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-12-2007, 11:28 AM   #15 (permalink)
Inactive
 
Join Date: 06-04-07
Posts: 8
iTrader: 0 / 0%
Latest Blog:
None

modine is liked by many
Thank you for your response. I have it working.

modine
modine 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 301 redirect esiason14 Coding Forum 2 01-31-2007 12:44 PM
.htaccess redirect problem..! Immo Coding Forum 16 08-03-2006 04:02 AM
.htaccess redirect question Pimpen 2010 Coding Forum 4 04-04-2006 10:34 AM
htaccess/mod rewrite help to redirect subdomain to a domain Thanol Coding Forum 0 07-19-2004 09:36 AM
.htaccess redirect to new webspace luchtzak Coding Forum 7 01-25-2004 09:56 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 08:32 PM.
© Copyright 2008 V7 Inc