Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

redirect www.xyz.com to xyz.com and the other way around

Posted on 2011-02-14
3
Medium Priority
?
322 Views
Last Modified: 2012-05-11
Hi,

is there a way to redirect any url of the form www.xyz.com/any_folder/anyfile.php?parameter=any_parameter

to
xyz.com/any_folder/anyfile.php?parameter=any_parameter

?
And is the xyz.com/..... option compatible with all browsers?

Regards,
G
0
Comment
Question by:expertsgerrit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Expert Comment

by:l4ncel0t
ID: 34886959
no problem

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


This should work
0
 

Author Comment

by:expertsgerrit
ID: 34891207
where should I put this?
any file that gets visited
some header file?
0
 
LVL 4

Accepted Solution

by:
l4ncel0t earned 2000 total points
ID: 34896068
In your apache config
If you have virtualhost in the virtualhost definition
if not in the main apache config file
eg
/etc/apache2/site-avaiable/apache2.conf
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

618 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