2

I config enable htaccess on my server (i enable mod_rewrite and do like this: https://stackoverflow.com/questions/11064005/enable-htacess-error-on-ubuntu-12-04-with-apache2)

But on localhost is run echo $_GET value php : http://oseeyou.com/test/on-localhost.png

and on server don't run: http://oseeyou.com/test/on-server.png

I don't understand this, may help me.

Thank.

5
  • 1- you want to ask your question in a better, understandable, english 2- if I understand your question, you just have a bad htaccess setup
    – neofutur
    Mar 13, 2013 at 3:06
  • Sorry neofutur, i not good english. In my htaccess file RewriteRule ^data/([^/.]+)/?$ data.php?id=$1 [L] .I don't $_GET['id'] on my server, but localhost is normal.
    – chinhdung
    Mar 13, 2013 at 4:04
  • 1
    why do you add ?id=$1 ? it sould not be needed to "forward" the get data, try with a more basic rewrite rule
    – neofutur
    Mar 13, 2013 at 4:12
  • 1
    give more info in the question, like this rewrite rule, the exact url you want to redirect . . . also save $_GET at the very beginning of the page, it will be emptied later
    – neofutur
    Mar 13, 2013 at 4:13
  • can you please show me the code of your htaccess? Mar 13, 2013 at 6:27

1 Answer 1

1
3
  • thank neofutur, i try your way but can't run. I will find other way config.
    – chinhdung
    Mar 13, 2013 at 5:00
  • also make sure your server is using apache , other webservers wont necessarily support htaccess / rewrite rules / the same syntax
    – neofutur
    Mar 13, 2013 at 7:48
  • my server is Debian 6.0 run apache2, php 5.3.3
    – chinhdung
    Mar 13, 2013 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.