User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Linux Servers and Apache section within the Tech Talk category of DaniWeb, a massive community of 427,339 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,133 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Linux Servers and Apache advertiser: Programming Forums
Views: 7411 | Replies: 12
Reply
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,943
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 117
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Apache redirection?

  #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.
Reply With Quote  
Join Date: Mar 2005
Location: South Africa
Posts: 4
Reputation: JRED is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
JRED JRED is offline Offline
Newbie Poster

Help Re: Apache redirection?

  #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  
Join Date: May 2005
Posts: 3
Reputation: MacemanDerek is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
MacemanDerek MacemanDerek is offline Offline
Newbie Poster

Re: Apache redirection?

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Linux Servers and Apache Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Linux Servers and Apache Forum

All times are GMT -4. The time now is 3:09 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC