473,513 Members | 2,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirect in .htaccess



Please forgive me if my English is poor. Also please tell me if
this is wrong place to ask this question and tell me better place.

When searching web for information Re: .htaccess and redirecting,
I see many different examples of methods.

I wish to be able to say "this is good method that I can always use"
even if exists other good methods.

I wish not be confused by many different examples of methods.

I know is much to ask for to write example .htaccess for me but one
"known to be good" example with "#" comments saying what each part
does would be very large help for learning.

Examples I desire to see: In following examples I desire person
typing in URL OLD to see magic URL change in browser URL NEW.

I Also desire search engine following link to URL OLD to see
301 redirect permanent to URL NEW.

Examples desired to see:

OLD: http://www.example.com
NEW: http://www.example.com/

OLD: http://example.com
NEW: http://www.example.com/

OLD: http://www.example.com/directory1/
NEW: http://www.example.com/

OLD: http://www.example.com/directory2/
NEW: http://www.example.com/directory3/directory4/

OLD: http://www.example.net/
NEW: http://www.example.org/

Many thanks for future help. I have web searched and read
many documentations and I am still confused.

Oct 30 '05 #1
3 2123
Sun, 30 Oct 2005 17:32:28 +0000 from Vardan Kushnir <so****@pol.ru>:
Please forgive me if my English is poor. Also please tell me if
this is wrong place to ask this question and tell me better place.

When searching web for information Re: .htaccess and redirecting,


Since you're trying to write an .htaccess file, does that mean you're
trying to configure an Apache server? If so, I recommend
alt.apache.configuration.

And don't worry about your English -- it's quite clear.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Oct 31 '05 #2
In our last episode,
<dk**********@domitilla.aioe.org>,
the lovely and talented Vardan Kushnir
broadcast on comp.infosystems.www.authoring.html:
Please forgive me if my English is poor. Also please tell me if
this is wrong place to ask this question and tell me better place. When searching web for information Re: .htaccess and redirecting,
I see many different examples of methods. I wish to be able to say "this is good method that I can always use"
even if exists other good methods.


There is not one way that will always work because there isn't
just one kind of server software.

The response codes (i.e. 404, 301, 500, etc.) *ARE* governed
by the htt protocol. They should be standard for any given
version of the protocol. But how the server software decides
which code to send is not regulated. Several kinds of servers
do use .htaccess files, but the syntax of the files is not
necessarily the same for different servers -- and all the
servers that use them can be configured to disable them;
many are so configured by default. Some servers do
not use .htaccess files at all.

You must discover what server software you are using and you
must consult the documentation for that specific server.

Searching the web for this documentation will not do any
good unless you know the kind and version of server you
are using.

--
Lars Eighner ei*****@io.com http://www.larseighner.com/
I don't see posts from or threads started from googlegroups.
War on Terrorism: Okay, Unleash OUR Extreme Fundamentalists
"... all of them who have tried to secularize America, I point the finger in
their face and say, 'You helped this happen.'" --Jerry Falwell
Oct 31 '05 #3
On Sun, 30 Oct 2005, Vardan Kushnir wrote:
Also please tell me if
this is wrong place to ask this question and tell me better place.


<news:comp.infosystems.www.servers.unix> or
<news:comp.infosystems.www.servers.ms-windows>

--
Netscape 3.04 does everything I need, and it's utterly reliable.
Why should I switch? Peter T. Daniels in <news:sci.lang>

Oct 31 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8906
by: | last post by:
This is an apache question (little off-topic) I have this .htaccess in web root -------------- ErrorDocument 404 /error404handler.php -------------- BUT I take in Mozilla this when I call a...
2
2664
by: Sean Pinto | last post by:
My hosting company has an automatic redirect page called /missing/missing.php and I want to log all of the page not founds that result in a redirection to missing.php. I can't seem to find out how...
7
16703
by: Tim Evans | last post by:
I'm using a meta-refresh construct to redirect a URL: <meta http-equiv="REFRESH" content="0;url=http://path/to/new/url"> I would like to be able to make this open in a new window, rather than...
5
4991
by: deko | last post by:
I'm trying to redirect requests for /index.php to /mydirectory/index.php If I use an index file in / with only this line: <?php header("Location:http://www.mysite.com/mydirectory/"); ?> that...
0
2084
by: Stuart Palmer | last post by:
Hi everyone, I'm trying to look for an asp equivilent of .htaccess that is used on apache servers but for use with asp. I am doing a website and moving lots of files into a single directory to...
2
3623
by: =?ISO-8859-1?Q?Fran=E7ois_de_Dardel?= | last post by:
I am not sure if this is the proper forum, but I always found very helpful information here and I would like to have the advice of experts. Just before new year (end Dec 2006), my internet...
8
5126
by: howa | last post by:
a page currently in HTTPS, I force the client to redirect to another page using HTTP under the same domain (e.g. abc.com), i.e. header("Location: http://www.abc.com/index.php"); IE...
2
1750
by: RuthC | last post by:
Hi. I am using .htaccess to redirect in my website Now I want to redirect a url, which Contain '-' to another url. ex: RewriteRule ^book-and-magazine-discount/ query.php?q=$1.
2
3733
by: RuthC | last post by:
Hi, In my website there is a facility for user to create there own pages we are maintaing this url as www.mywebsite.com/mypage/user created page name ex : www.mywebsite.com/mypage/ruth user...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.