Hello everybody!! !! How r u???? Ive just arrived !! my first post !! Hope u can help me!! I have a hostinga nd im using a php as a cgi , i have problems with a mod_rewrite , dont work :S! dont know why :S!! im a little noob in this thing , ive heart that rewrite is diferents when php is installed as a CGI , can give me a hand?? please! RewriteEngine on RewriteBase / RewriteRule ^show\.php/(.*)$ show2.php?img=$1 [L] RewriteRule ^out\.php/([a-z]{1})(.*)$ out2.php?$1=$2 [L] RewriteRule ^view\.php/(.*)$ view2.php?img=$1 [L] RewriteRule ^image\.php/([a-z]{1})(.*)$ images2.php?$1=$2 [L] RewriteRule ^gallery/([0-9]+)-([^/]*)/(.*)$ gallery.php?gal=$1&img=$3 [L] RewriteRule ^view/([0-9]+)-([^/]*)/(.*)$ gallery_body.php?gal=$1&img=$3 [L] Here is the httacces!! Thanks for your time and help!! PSD: im peruvian and dont speak english T_T!! sorry if u cant undertand me veru wel T_T!! Cyas Att Hounter
Hello!! Thanks alot!!!! for ur help!!! and time! Look: I have this link ---> http://www.imagehost123.uni.cc/out.php?i=32_presidente6zw.jpg and want to convert to: http://www.imagehost123.uni.cc/out.php/i32_presidente6zw.jpg ive used: RewriteRule ^out\.php/([a-z]{1})(.*)$ out2.php?$1=$2 [L] whant is wrong?? No show me any errors :S Thanks for ur help!!!
You could use something like this: Code: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /out2.php?i=$1 [L,QSA] </IfModule> You'd then use http://www.imagehost123.uni.cc/out.php/32_presidente6zw.jpg instead of http://www.imagehost123.uni.cc/out.php/i32_presidente6zw.jpg, and it would get converted to http://www.imagehost123.uni.cc/out2.php?i=32_presidente6zw.jpg.
:O alots of thanks , But im noob T_T! the code that u posted , u have to put it in a httacces? thanks again Att Hounter