Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

htaccess 301 redirect

Posted on 2013-05-30
4
Medium Priority
?
316 Views
Last Modified: 2013-07-16
Hi

I am looking for a redirect from one path to another for example

www.domain.com/old-page

Open in new window


to

www.domain.com/cat/new-page

Open in new window


I cant use the domain in my redirect as the htaccess is shared across staging, preprod and production instances with each having its ow domain.

I envision something like this...

RewriteRule ^old-page /cat/new-page/ 

Open in new window


Any help would be appreciated |
0
Comment
Question by:is_numeric
  • 3
4 Comments
 
LVL 23

Expert Comment

by:tailoreddigital
ID: 39208402
# This allows you to redirect your entire website to any other domain
Redirect 301 / http://www.domain.com/cat/new-page


FYI,
https://kb.mediatemple.net/questions/242/How+do+I+redirect+my+site+using+a+.htaccess+file%3F
0
 

Author Comment

by:is_numeric
ID: 39210059
I do not want to redirect from an old domain to a new domain.

I want to redirect part of the URL to a new path without using the domain reference
0
 

Accepted Solution

by:
is_numeric earned 0 total points
ID: 39317482
Don't need this solution any more. Not needed.
0
 

Author Closing Comment

by:is_numeric
ID: 39329093
Not needed
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Loops Section Overview
Suggested Courses
Course of the Month10 days, 22 hours left to enroll

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question