Solved

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

Posted on 2011-02-14
3
312 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
  • 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 500 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now