Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6700011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:45:50+00:00 2026-05-26T06:45:50+00:00

I just changed url schemes, so example.com/ugly is now example.com/nice example.com/ugly still handles the

  • 0

I just changed url schemes, so example.com/ugly is now example.com/nice

example.com/ugly still handles the request – .htaccess has this rule:

RewriteRule ^nice$ example.com/ugly [PT,L,QSA]

This much works.

Now I’d like to redirect example.com/ugly to example.com/nice, but still have example.com/ugly handle the request. Something like this:

  1. Redirect example.com/ugly to example.com/nice (301)
  2. Internally redirect example.com/nice to example.com/ugly, without letting the user know, and without repeating step 1

Simple ways of doing this lead to looping of course. Is there a way to do this with .htaccess? If not, is there another way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:45:51+00:00Added an answer on May 26, 2026 at 6:45 am

    The best way I know of is using PHP in the target file. Here’s approximately what you’d want to add:

    if($_SERVER['REQUEST_URI'] == '/index.php') header("Location: http://".$_SERVER['HTTP_HOST']."/");
    

    Obviously you need to add some other variables in there to handle whatever requests, but that’s the basic idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to workaround the Webpage has expired issue. First, I just changed a
An svn repository I'm mirroring through git-svn has changed URL. In vanilla svn you'd
I created a web view and im trying to just launch google.com for now.
I just enabled Failed Request Tracing for a site and I get a URL_CHANGED
Hi I am using Mysql 5.0.x I have just changed a lot of the
I just recently changed out all my hard drives and in the process of
I have just installed a new ssl certificate on GlassFish 3. I also changed
I just transferred my local web app to my server, and now I'm getting
I just had this thought, I don't know if I am slow though. Usually,
I just changed my storage backend to Amazon S3, and I realized that my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.