Apache redirection?

Reply

Join Date: Feb 2002
Posts: 12,054
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 128
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Apache redirection?

 
0
  #11
Mar 23rd, 2004
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.
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 5
Reputation: JRED is an unknown quantity at this point 
Solved Threads: 0
JRED JRED is offline Offline
Newbie Poster

Re: Apache redirection?

 
0
  #12
Mar 10th, 2005
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...
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 3
Reputation: MacemanDerek is an unknown quantity at this point 
Solved Threads: 0
MacemanDerek MacemanDerek is offline Offline
Newbie Poster

Re: Apache redirection?

 
0
  #13
May 5th, 2005
I'm not sure if this was said already, but I'll tell you anyways.

You can add "Redirect 301 /index.php http://www.daniweb.com" (without the quotes) to a .htaccess file within your /www or /public_html folder.

Hope this helps.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Linux Servers and Apache Forum
Thread Tools Search this Thread



Tag cloud for Linux Servers and Apache
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC