After mod rewrite activated, POST variables not passing from one file to another

Discussion in 'Programming' started by Rockstr27, Jan 25, 2010.

  1. #1
    Hello - I have a script where I adjusted the mod re-write to change all my URLs, and not my POST variables are not passing from one page to another - they will pass to the same file, but even tho I put in absolute paths for my form action, it pulls up the page, but does not read the variables - any thoughts on how to fix that?
     
    Rockstr27, Jan 25, 2010 IP
  2. ARE$

    ARE$ Peon

    Messages:
    124
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Please, show your code. For sure will be easier to help you. You can send me also an example link via PM
     
    ARE$, Jan 26, 2010 IP
  3. Rockstr27

    Rockstr27 Well-Known Member

    Messages:
    1,052
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    115
    #3
    Before I narrowed the problem down to a mod-rewrite issue, I had another thread where I posted code and outputs of various troubleshooting here:

    http://forums.digitalpoint.com/showthread.php?t=1668588

    Now I am at the point of passing the variables through another method ... which will end up being such a sloppy way of doing what I need, but for now, I just need to get past this and move on to the other things on my to-do list! Any thoughts will be appreciated and I will post what happens to work ...

    EDIT: Also, here is what I have in htaccess:

    		RewriteEngine on
    		RewriteCond %{HTTP_HOST} ^sub.mydomain.com [NC]
    		RewriteRule ^(.*)$ http://www.sub.mydomain.com/$1 [L,R=301] 
    		RewriteCond %{HTTP_HOST} ^sub.mydomain.com [NC]
    
    		RewriteCond %{THE_REQUEST} ^.*/index.php
    
    		RewriteRule ^(.*)index.php$ http://sub.mydomain.com/$1 [R=301,L]
    
    		RewriteRule ^10001/seo-friendly-url/$ page.php?video=10001&r=301
    		RewriteCond %{QUERY_STRING} ^video=10001$
    		RewriteRule ^(.*) http://sub.mydomain.com/10001/seo-friendly-url/? [R=301]
    PHP:
     
    Last edited: Jan 26, 2010
    Rockstr27, Jan 26, 2010 IP
  4. Rockstr27

    Rockstr27 Well-Known Member

    Messages:
    1,052
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    115
    #4
    well ... I found this line to be the culprit that is disallowing my variables to be passed:

    RewriteRule ^(.*)$ http://www.subdomain.domain.com/$1 [L,R=301] 
    PHP:
    Can anyone help me come up with a way to modify this line to avoid the POST variables getting lost? Or perhaps I do not need it?
     
    Last edited: Jan 26, 2010
    Rockstr27, Jan 26, 2010 IP