.htaccess question

by 3 replies
4
Hey, I have limited experience with .htaccess and mod_rewrite, so naturally I'm having a small issue. I have it set so mysite.com/keyword/value redirects to mysite.com/phppage.php?value=value. This works fine, but I can't seem to figure out how to get the address bar to keep showing mysite.com/keyword/value instead of the actual php page with the variable value. Everything I've looked at seems to say that it just naturally does that, but I can't figure why it's not doing it for me.

Any ideas?
#programming #htaccess #question
  • What is the contents of your htaccess file?
  • Code:
    RewriteEngine on
    RewriteBase /
    
    # RewriteRule ^local/([-_A-Za-z0-9]+)$ http://www.thesite.com/innertemplate.php?local=$1 [L]
    RewriteCond %{REQUEST_URI} ^/chiropractor/.*$ [NC]
    RewriteRule ^chiropractor/([-_A-Za-z0-9]+)$ http://www.thesite.com/innertemplate.php?local=$1 [R,L]
    • [1] reply
    • In case somebody else needs help with this type of issue:
      Code:
      RewriteEngine on
      #RewriteBase /
      
      RewriteRule ^chiropractor/([-_A-Za-z0-9]+)$ /innertemplate.php?local=$1 [L]
      This code worked for me.

Next Topics on Trending Feed

  • 4

    Hey, I have limited experience with .htaccess and mod_rewrite, so naturally I'm having a small issue. I have it set so mysite.com/keyword/value redirects to mysite.com/phppage.php?value=value. This works fine, but I can't seem to figure out how to get the address bar to keep showing mysite.com/keyword/value instead of the actual php page with the variable value. Everything I've looked at seems to say that it just naturally does that, but I can't figure why it's not doing it for me. Any ideas?