(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-22-24 12:21 AM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - URL redirection New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
Mercury

0


 





Since: 11-18-05

Last post: 6471 days
Last view: 6471 days
Posted on 08-31-06 09:17 AM Link | Quote
I will soon have 1 hosting plan and +3 domain names.
Now I know it's possible to redirect every url to a certain subdomein.

I assume like this (in the .htaccess file):

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain2.ext$ [NC]
RewriteRule ^(.*)$ http://subdomain.domain1.ext/$1 [R=307,L]

Now my question, when you type the address http://www.domain2.ext, will it change to http://subdomain.domain1.ext in the address bar? Or will you still see http://www.domain2.ext.

Or for example if you go to http://www.domain2.ext/folder/file.php, will the url change to http://subdomain.domain1.ext/folder/file.php or will it stay like you typed it first?

Guy Perfect









Since: 11-18-05

Last post: 6304 days
Last view: 6302 days
Posted on 08-31-06 06:00 PM Link | Quote
Redirections are handled by the web server, not server-side CGI programs. Consult the documentation of your server software to see how to properly handle URL redirections.

Standard HTTP redirections will indeed change the URL. So "www.wikipedia.com" can become "www.wikipedia.org" and so-forth.
MisterJones

Tooky








Since: 12-08-05
From: Mexico

Last post: 6391 days
Last view: 6328 days
Posted on 08-31-06 08:32 PM Link | Quote
Originally posted by Guy Perfect
Redirections are handled by the web server, not server-side CGI programs.


All I see there is the use of .htaccess, not any sort of server side cgi program.


(edited by MisterJones on 08-31-06 07:32 PM)
Mercury

0


 





Since: 11-18-05

Last post: 6471 days
Last view: 6471 days
Posted on 09-01-06 08:07 AM Link | Quote
Indeed, what I wanted to know was if the url in the address bar in your browser will change to the 'ugly' url or will it stay as how you typed it.

Don't have my hosting now, so can't test it myself.
Cellar Dweller +

Red Koopa









Since: 11-18-05
From: Arkansas

Last post: 6311 days
Last view: 6302 days
Posted on 09-02-06 12:28 AM Link | Quote
You may want to look at http://www.modrewrite.com/. In particular, you may and to go to http://forum.modrewrite.com/viewtopic.php?t=1445, and scroll down to the "Mod-Rewrite Directives for URL Redirection" section. It appears your rules will cause the address bar to change.

You could try installing Apache on your computer and test it. But you would need to read the docs to see how to configure it. Also, if you do this, you will need to put your test domains in your hosts file when you do the test.
Mercury

0


 





Since: 11-18-05

Last post: 6471 days
Last view: 6471 days
Posted on 09-02-06 07:40 AM Link | Quote
Thx for the url, I'll check it out!
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - Programming - URL redirection |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.028 seconds; used 368.99 kB (max 443.25 kB)