Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

How To Write Redirect For Dynamic Page?


  • Please log in to reply
2 replies to this topic

#1 leontine

leontine

    HR 2

  • Members
  • PipPip
  • 13 posts

Posted 02 May 2009 - 11:43 AM

How and where can I write a redirect for the following page:

I need:

www.domain.com/categories.php?cat=7

to go to:

www.domain.com/Hikari-shears-categories.htm

Is this done in an htaccess file? Please help,I find this very confusing!

Leontine

#2 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 02 May 2009 - 12:05 PM

Using .htaccess is one way to do it, assuming of course you're on a Unix/Linux system with mod_rewrite enabled. If you've got those the following should do the trick.

CODE
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/categories.php
RewriteCond %{QUERY_STRING} ^cat=7$
RewriteRule ^(.*)$ http://www.domain.com/Hikari-shears-categories.htm? [R=301,L]


#3 leontine

leontine

    HR 2

  • Members
  • PipPip
  • 13 posts

Posted 02 May 2009 - 12:15 PM

Thank you so much Randy!

It turns out the site already has an .htaccess file on the server, with some code in it from the hosting company (totalchoicehosting). Can I paste your code below their code which looks like this:

------------------------------
CODE
php_value session.save_path /home/sharper/sessions
# -FrontPage-

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.staysharpshears.com
AuthUserFile /home/sharper/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/sharper/public_html/_vti_pvt/service.grp

------------------

Thanks again!

Leontine





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

We are now a read-only forum.
 
No new posts or registrations allowed.