Reply
htaccess vs php
Old 03-07-2007, 01:01 PM htaccess vs php
Junior Talker

Posts: 1
Name: Francis Jock
Yahoo does not allow .htaccess files on their servers. How can I create/write the following in php? (or any other way for that matter)

RewriteEngine On
RewriteRule ^([^/]{2})/(.*)$ websitetranslator/index.php?lang=$1&url=$2 [L]

I am not a progammer, but I'm working on it! Thanks
fxjox is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 03-08-2007, 02:29 AM Re: htaccess vs php
kreoton's Avatar
Extreme Talker

Posts: 194
sorry this trick is not posible with php
kreoton is offline
Reply With Quote
View Public Profile Visit kreoton's homepage!
 
Old 03-08-2007, 03:34 AM Re: htaccess vs php
OmuCuSucu's Avatar
Vi Veri Veniversum Vivus

Posts: 1,167
Name: Dragos-Valentin
Location: Cluj-Napoca, RO
fxjox ... when a user enters an addres like http://www.blahblah.com/blahblahpage.php, his request goes to the server (apache, windows or whatever) not to php.exe ... that means php can't do anything if the page doesn't phisically exist. you need the server to see that even if the page doesn't phisically exist the request should be processed by another php script. also php can't change the address displayed to the user, the httpd software can. so no, you can't program that in php without .htaccess
__________________
.
» Please remember to add to my Talkupation if you enjoyed my post. Thank you :)
.
OmuCuSucu is offline
Reply With Quote
View Public Profile
 
Old 03-09-2007, 01:43 AM Re: htaccess vs php
mtishetsky's Avatar
King Spam Talker

Posts: 1,054
Name: Mike
Location: Mataro, Spain
Yahoo does not allow .htaccess or mod_rewrite? This trick can be performed using ErrorDocument and regexes on $_SERVER['REQUEST_URI'] (it is called "mod_rewrite for the poors").
__________________
Free Mobile Phone Themes

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Reply     « Reply to htaccess vs php
 

Thread Tools

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
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.14195 seconds with 12 queries