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 6631889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:36:35+00:00 2026-05-25T22:36:35+00:00

I want to redirect from a temporary URI like http://subdomain.test.com/~user77/ to http://www.testing.com This is

  • 0

I want to redirect from a temporary URI like

http://subdomain.test.com/~user77/

to

http://www.testing.com

This is a temporary URI and points to the same webserver. All requests like

http://subdomain.test.com/~user77/index.php
http://subdomain.test.com/~user77/lib/javascript.js

should be redirected to

http://www.testing.com/index.php
http://www.testing.com/lib/javascript.js

How can I achieve this? I have the following htaccess code

RewriteCond %{HTTP_HOST} ^http://subdomain.test.com/~user77/$ [NC]
RewriteRule ^(.*)$ http://www.testing.com/$1 [R=301,L]

But it doesn’t seem to work. If I input subdomain.test.com/~user77 I see the same URL (subdomain.test.com/~user77). What I’m doing wrong?

UPDATE:
Full htaccess:

#####
# 
# Example .htaccess file for TYPO3 CMS - for use with Apache Webserver
# 
# This file includes settings for the following configuration options:
# 
# - Compression via TYPO3
# - Settings for mod_rewrite (URL-Rewriting)
# - PHP optimisation
# - Miscellaneous
# 
# If you want to use it, you have to copy it to the root folder of your TYPO3 installation (if its
# not there already) and rename it to '.htaccess'. To make .htaccess files work, you might need to
# adjust the 'AllowOverride' directive in your Apache configuration file.
# 
# IMPORTANT: You may need to change this file depending on your TYPO3 installation!
#
# Lines starting with a # are treated as comment and ignored by the web server.
# 
# You should change every occurance of TYPO3root/ to the location where you have your website in.
# For example:
# If you have your website located at http://mysite.com/
# then your TYPO3root/ is just empty (remove 'TYPO3root/')
# If you have your website located at http://mysite.com/some/path/
# then your TYPO3root/ is some/path/ (search and replace)
# 
# You can also use this configuration in your httpd.conf, but then you have to modify some lines,
# see the comments (search for 'httpd.conf')
# 
# Questions about this file go to the matching Install mailing list, see
# http://typo3.org/documentation/mailing-lists/
# 
####


### Begin: Compression via TYPO3 ###

# Compressing resource files will save bandwidth and so improve loading speed especially for users
# with slower internet connections. TYPO3 can compress the .js and .css files for you.
# 1) Uncomment the following lines and
# 2) Set $TYPO3_CONF_VARS['BE']['compressionLevel'] = '9'

#<FilesMatch "\.js\.gzip$">
#   AddType "text/javascript" .gzip
#</FilesMatch>
#<FilesMatch "\.css\.gzip$">
#   AddType "text/css" .gzip
#</FilesMatch>
#AddEncoding gzip .gzip

### End: Compression via TYPO3 ###


### Begin: Browser caching of ressource files ###

# Enable long browser caching for JavaScript and CSS files.

# This affects Frontend and Backend and increases performance.
# You can also add other file extensions (like gif, png, jpg), if you want them to be longer cached, too.

<FilesMatch "\.(js|css)$">
  <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault "access plus 7 days"
  </IfModule>
  FileETag MTime Size
</FilesMatch>

### End: Browser caching of ressource files ###


### Begin: Settings for mod_rewrite ###

# You need rewriting, if you use a URL-Rewriting extension (RealURL, CoolUri, SimulateStatic).

<IfModule mod_rewrite.c>

# Enable URL rewriting
RewriteEngine On

# Change this path, if your TYPO3 installation is located in a subdirectory of the website root.
#RewriteBase /

# Rule for versioned static files, configured through:
# - $TYPO3_CONF_VARS['BE']['versionNumberInFilename']
# - $TYPO3_CONF_VARS['FE']['versionNumberInFilename']
# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]

# Stop rewrite processing, if we are in the typo3/ directory.
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
RewriteRule ^(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]

# Redirect http://example.com/typo3 to http://example.com/typo3/index_re.php and stop the rewrite processing.
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
RewriteRule ^typo3$ typo3/index_re.php [L]

# If the file/symlink/directory does not exist => Redirect to index.php.
# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

# Main URL rewriting.
# For httpd.conf, use this line instead of the next one:
# RewriteRule .* /TYPO3root/index.php [L]
RewriteRule .* index.php [L]

</IfModule>

### End: Settings for mod_rewrite ###


### Begin: PHP optimisation ###

# If you do not change the following settings, the default values will be used.

# TYPO3 works fine with register_globals turned off.
# This is highly recommended, if your web server has it turned on.
#php_flag register_globals off

### End: PHP optimisation ###



### Begin: Miscellaneous ###

# Make sure that directory listings are disabled.
#Options -Indexes

### End: Miscellaneous ###


# Add your own rules here.
# ...
RewriteCond %{HTTP_HOST} ^http://subdomain.test.com/$ [NC]
RewriteRule ^~user77/(.*)$ http://www.testing.com/$1 [R=301,L]
  • 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-25T22:36:36+00:00Added an answer on May 25, 2026 at 10:36 pm

    Try the following:

    RewriteCond %{HTTP_HOST} ^http://subdomain.test.com/$ [NC]
    RewriteRule ^~user77/(.*)$ http://www.testing.com/$1 [R=301,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a redirect from http://example.com to http://www.example.com . now i want this redirect
I want to redirect one specific url like: www.example.com/test/ex.gif to static.example.com/ex.gif How can i
I want to redirect a praticular subdomain to the main domain http(s)://dl.example.com/par1/par2 to http(s)://www.example.com/par1/par2
You see, I want to redirect [R] from http://www.domain.com/dir1/ to http://www.domain.com/ . I also
I want to 301 redirect from: www.olddomain.com to the root of newdomain.com but I
Apache: How redirect from domain.com to www.domain.com? I dont want my users who type
My URLs http://www.mysite.com/folder1/page1.aspx http://www.mysite.com/folder1/page1.aspx?id=1 http://www.mysite.com/folder1/page1.aspx?id=1&dt=20111128 Redirecting Page http://www.mysite.com/folder1/page2.aspx I want to redirect from page1.aspx
I want to redirect all traffic from www.mydomain.com to mydomain.com, even when there is
I want to redirect all requests for index.html|php|php5 to http://www.domain.co.uk/ using mod_rewrite and I've
I am using the JavaScript version of the mobile redirect from: http://detectmobilebrowser.com/ However I

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.