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   High Bandwidth Dedicated Servers   V7N Directory

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

antispyware is liked by many
Please tell me how to make 301 redirection of these links in this .htaccess file?

Hello,
I have a .htaccess file and this is the code:
-----------------------
RewriteEngine on
RewriteRule ^site/(.*)$ site.php?id=$1
RewriteRule ^downloads/(.*)$ search.php?keywords=$1
RewriteRule ^downloads/(.*)/(.*)$ search.php?keywords=$1_$2
RewriteRule ^download/(.*)/(.*)$ search.php?keywords=$1&page=$2
RewriteRule ^review/(.*)$ review.php?d=$1
RewriteRule ^edit/(.*)$ edit.php?d=$1
RewriteRule ^refer/(.*)$ refer.php?d=$1

IndexIgnore *

Redirect http://mysite.com/s/ http://mysite.com/s/create.php

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

( mysite.com is not my site. )

I have checked the links in a popular "search engine friendly check
tool" and it shows that my links are not SE friendly.

I wish to make all these redirections 301.
I have placed [R=301] at the end of all the lines above, but it didn't
worked.

Please tell me how to make the links search engine friendly.

Thanks a lot.
antispyware is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 07-10-2007, 02:00 PM   #2 (permalink)
Contributing Member
 
Join Date: 06-29-07
Posts: 93
iTrader: 0 / 0%
Latest Blog:
None

roger_d is liked by many
Hi,


To redirect a directory
redirect 301 /adir http://www.mysite.com/bdir/

To redirect abc.html in adir subdirectory to def.html in same subdirectory
redirect 301 /adir/abc.html http://www.mysite.com/adir/def.html

To redirect entire site from http://mysite.com to http://www.mysite.com
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite.com
RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
roger_d 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
Need help with .htaccess file (www. redirection) projectwealth Domain Name Forum 4 01-09-2008 06:32 AM
Need help with HTACCESS file brandnew Coding Forum 2 12-02-2007 11:13 PM
Some help with .htaccess file and 301 Redirects Pairodime Coding Forum 7 04-12-2007 03:04 PM
.htaccess file handling eloquent Coding Forum 6 02-01-2007 02:07 AM
.htaccess redirection problem; URL without ending slash 404s Matthew Doucette Coding Forum 3 03-15-2006 04:41 PM


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


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