Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
How to redirect using .htaccess
Old 07-30-2010, 09:51 AM How to redirect using .htaccess
Banned

Posts: 39
Trades: 0
I am not exactly sure if .htaccess is something considered html or if its coding is its own type so I just decided to go ahead and post it here. If the topic should be somewhere else, feel free to move it

I am trying to make my website redirect to Google translate in a certain way but it doesn't seem to be working. Could someone tell me if this is an issue with how HostGator has their servers setup or if it just my coding.

I want http://www.idevlancer.com/es to redirect to http://translate.google.com/trans...devlancer.com/ which is that page translated into Spanish obviously. However, whenever I go to that link in my browser, it is actually forwarding me to that page. But, I am wanting it to keep my on idevlancer.com instead.

That way people can just go to URL's like this for example (and see them like this):
http://www.idevlancer.com/es/index.php
http://www.idevlancer.com/es/test1.php
http://www.idevlancer.com/es/test2.php
http://www.idevlancer.com/es/test3.php
http://www.idevlancer.com/es/test4.php

Here is the code that is being used in .htaccess for what it is doing right now:

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^idevlancer.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.idevlancer.com$
RewriteRule ^es\/?(.*)$ "http\:\/\/translate\.google\.com\/translate\?hl\=es\&sl\=en\&u\=http\:\/\/www\.idevlancer\.com\/$1" [R=301,L]
If anyone can be of any help that would be wonderful!

Last edited by CyberWizard; 07-30-2010 at 10:04 AM..
CyberWizard is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-30-2010, 10:03 AM Re: How to redirect using .htaccess
Siemen's Avatar
Average Talker

Posts: 17
Trades: 0
.htaccess is configuration file from apache, have nothing common with php.
If I understand good, after entering on http://www.idevlancer.com/es you want to show http://translate.google.com.vn/trans...devlancer.com/ but to not change address ? Maybe try iframe?
Siemen is offline
Reply With Quote
View Public Profile
 
Old 07-30-2010, 10:05 AM Re: How to redirect using .htaccess
Banned

Posts: 39
Trades: 0
Exactly, and it should work as a wildcard as well like I have it. That way you can click around to different folders while still staying within the /es/ folder.

How would I go about doing that?

Please and thank you

Last edited by CyberWizard; 07-30-2010 at 10:11 AM..
CyberWizard is offline
Reply With Quote
View Public Profile
 
Old 07-30-2010, 10:50 AM Re: How to redirect using .htaccess
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,390
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You can't, a redirect does what it says, redirects

framesets or iframes will have to do. OR of course have the pages translated PROPERLY.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-30-2010, 11:20 AM Re: How to redirect using .htaccess
Banned

Posts: 39
Trades: 0
How could I get framesets to iframes to work in that manner for idevlancer.com? What exactly would I need to add and where?

For example, if someone is at /es/index.php and they click on the test2.php link then it should take them to /es/test2.php (not just test2.php) that way the users will not have to continuously translate each page individually...

Sorry for not really knowing a lot about this, our church is just try to do some stuff like this and I am not experience at all with this area of expertise.

It should work basically like the links on this page work when you click on them:
http://www.fellowship.co/misc.php?action=help&hid=14

Thank you for any time and support you can give.

Last edited by CyberWizard; 07-30-2010 at 11:22 AM..
CyberWizard is offline
Reply With Quote
View Public Profile
 
Old 07-30-2010, 11:39 AM Re: How to redirect using .htaccess
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,390
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Use document relative links, provided the file names are all the same in each folder ...
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?

Last edited by chrishirst; 07-30-2010 at 11:52 AM..
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to How to redirect using .htaccess
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23236 seconds with 12 queries