Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1371 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

advanced mod rewrite help

Thread title: advanced mod rewrite help
Reply    
    Thread tools Search this thread Display Modes  
04-12-2009, 10:47 PM
#1
tanicos is offline tanicos
Status: Member
Join date: May 2008
Location:
Expertise:
Software:
 
Posts: 164
iTrader: 5 / 100%
 

tanicos is an unknown quantity at this point

  Old  advanced mod rewrite help

hi


i want to achieve this

anything that comes from

domainname.com
www.domainname.com
http://www.domainname.com
http://www.domainname.com/index.php

to go straight to

http://www.domainname.com/index.php?language=ge

i need that language to be displayed directly when someone enters the site
thanks

Reply With Quote
04-13-2009, 12:24 AM
#2
46Bit is offline 46Bit
Status: Member
Join date: Mar 2009
Location: Yorkshire
Expertise: Web Development
Software:
 
Posts: 275
iTrader: 10 / 100%
 

46Bit is on a distinguished road

Send a message via MSN to 46Bit Send a message via Skype™ to 46Bit

  Old

Code:
RewriteEngine On
RewriteRule ^(index\.php)?$ index.php?language=ge
There you go
If you want it to match index.html as well, use:
Code:
RewriteEngine On
RewriteRule ^(index\.(php|html))?$ index.php?language=ge

Reply With Quote
04-13-2009, 12:33 AM
#3
tanicos is offline tanicos
Status: Member
Join date: May 2008
Location:
Expertise:
Software:
 
Posts: 164
iTrader: 5 / 100%
 

tanicos is an unknown quantity at this point

  Old

thank you..that is working indeed...but i want only the index.php file to redirect to that language thing since i have another rule to

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

Reply With Quote
04-15-2009, 05:59 AM
#4
sweet4ever is offline sweet4ever
Status: I'm new around here
Join date: Apr 2009
Location:
Expertise:
Software:
 
Posts: 2
iTrader: 0 / 0%
 

sweet4ever is on a distinguished road

  Old

Hi,

This is very common issue now day !!

you have to use 301 permanent redirection for this. if you are using apache server than you have write code in .htaccess file and if you are using IIS then in IIS Server admin setting will give you the preferred URL setting option so you can resolve issue properly.

Reply With Quote
Reply    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed