SunQuest
           Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 7th, 2001, 04:55 AM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
.htaccess for a multi-language site

I'm an Apache newbie.
I have Apache+php+mysql.
I have access to the .htaccess file.

I would like to have this virtual directory:
mysite.com/en/articles/1/
(english language, article 1)

point to this:
articles?lang=en&id=1.

Inside my .htaccess I can use the RewriteRule to do so.
It works fine but...
My problem is that I do not want to change the url!
Want to have in the url bar
mysite.com/en/articles/1/
but call
articles?lang=en&id=1.

Do you think that the only way to do so is to use a script?
such as:
<Files en>
ForceType application/x-httpd-php
</Files>
and inside it call different pages?


<Thanks for advice>
Andrea
</Thanks>

Reply With Quote
  #2  
Old July 7th, 2001, 08:16 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> My problem is that I do not want to change the url!

Then you'd be looking at internal redirection.

>> Do you think that the only way to do so is to use a script?

No. Just do a search in this forum. I have replied to this stuff dozen times.

Reply With Quote
  #3  
Old July 8th, 2001, 02:21 AM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Thank you for your answer.
As you said doing a search in the forum I found my answers.
I use as you said an internal redirection and it worked fine for my needs.
This on my Pc.
Last night I discovered that my web hosting apache configuration do not have the mod_rewrite installed.
They will evaluate to install it, but I have no time to wait them for.
I'm in a hurry with my web site project,
so I think that I will use the script solution.

Thanks again,
ciao Andrea.

Reply With Quote
  #4  
Old July 8th, 2001, 04:49 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
mod_rewrite is the only scripting language-like modules embedded to Apache. Yes, it's not a default module but it's highly recommended to add it to take advantage of its flexibility and functionality.
If your host refuse to add it, just switch host, not because they don't listen to customers, but they are not aware of how powerful mod_rewrite can be due to their limited technical experience.

Reply With Quote
  #5  
Old July 11th, 2001, 04:45 AM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
An opinion

Sorry for taking your time,
but need some advices.
I'm looking for a new web hosting service.
I found one that could give me what I need,
an access to httpd.conf file and more.
I could choose a root access but this plan cost too much for me (150$) instead of (60$).

More technically:
Their machine is base on freeBSD 4.1,
I see the last stable is 4.3.
You write in other posts that Apache+freeBSD it's good union.
Their machine has Apache(1.3.12) + freeBSD4.1,
are this releases a good choice?

This is a more specific apache question.
The modules compiled with their apache are:
mod_so.c
mod_auth_mysql.c
mod_frontpage.c

Are this a good setup or a basic important module is missing?
I use Php+Apache+MySQL.
At this time I use htppd.conf and .htaccess to do some "internal redirection", or disallow some access to certain directory.
Maybe one day I'll need some virtual hosting.

Hope not asking something repetitive.
Thanks you
Andrea.

Reply With Quote
  #6  
Old July 12th, 2001, 05:25 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> I could choose a root access

What do you mean by root access? You have unrestricted full control of their server? Have you ever thought of running Apache off your own box?

>> heir machine has Apache(1.3.12) + freeBSD4.1,
>> are this releases a good choice?

FreeBSD alone is a much better choice than Linux and any others. Apache 1.3.12 is a bit out of date, consider the latest 1.3.20 if at all possible.

>> The modules compiled with their apache are:.....

Those are just the modules compiled in statically. As you can see from mod_so, there should be alot more shared modules not being listed. mod_frontpage is not a good module to have it compiled in any case (even in a hosting environment). It potentially adds more vulnerabilities to the server. Not only that, it also requires a large value for RLimitCPU and RLimitMEM then your system defaults. That said, mod_frontpage alone simply takes up too many system resources. In other words, don't use MS server products if possible. Linux is also out of my consideration just because of the existence of BSDs.

>> At this time I use htppd.conf and .htaccess to do some "internal redirection"

You don't really need to have write access to httpd.conf to do internal redirection, .htaccess is just fine (except RewriteMap). For performance and reliability wise, it's better to do it in httpd.conf.

Anyhow, try to figure out the opportuntity cost for running your own server rather than hosting with others. At the very least, hardware cost is no longer a concern these days.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > .htaccess for a multi-language site


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway