| | |
Apache redirection?
![]() |
I have mod_rewrite enabled and I am currently using it so that my forums and threads have .html exensions
i.e. to redirect to the real php pages.
i.e. to redirect to the real php pages. Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
•
•
Join Date: Mar 2005
Posts: 5
Reputation:
Solved Threads: 0
Hi, I am new to your forum, but if I understand your query correctly,
I think you can try the following:
Here goes....
Providing that your DNS is correctly pointed
and both url's point to the same server, you need to add the following to httpd.conf
#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client. When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off
NameVirtualHost *:80 # if it doesnt exist already
and then in the Virtualhost Container
<VirtualHost *:80>
ServerName www.somedomain.com
ServerAlias somedomain.com
## Some other stuff
</VirtualHost>
This will tell Apache to redirect all requests to any of the above url's to the specified virtual host.
Hope it helps...
I think you can try the following:
Here goes....
Providing that your DNS is correctly pointed
and both url's point to the same server, you need to add the following to httpd.conf#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client. When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off
NameVirtualHost *:80 # if it doesnt exist already
and then in the Virtualhost Container
<VirtualHost *:80>
ServerName www.somedomain.com
ServerAlias somedomain.com
## Some other stuff
</VirtualHost>
This will tell Apache to redirect all requests to any of the above url's to the specified virtual host.
Hope it helps...
![]() |
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: please help a newbie out with apache
- Next Thread: no website configured at this adress
| Thread Tools | Search this Thread |
Tag cloud for Linux Servers and Apache
.net amazon apache apple asus bbc bluegene centos cisco citrix cloud cloudcomputing code datacenters debian dell desktops development distributions drivers economy eeepc energy enterprise fedora fsf gadgets gentoo gnu gos government gpl hardware hyper-v ibm java jobs kindle knoppix kvm laptop laptops lawsuits ldap licensing linustorvalds linux linuxfoundation linuxmagazine magazines microserver microsoft mobile mobilephones netbooks news novell olpc open openmoko openoffice opensolaris opensource operatingsystems os patents pc pcworld plathome politics print qumranet redhat rhel robot russia sco server servers slackware software solaris source stallman sun supercomputer support tivo torvalds training tv ubuntu umpc unix virtualization vmware windows x86 xandros xen






