3 replies
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?
#htaccess #question
  • Profile picture of the author Emilian
    What is the contents of your htaccess file?
    {{ DiscussionBoard.errors[173214].message }}
  • Profile picture of the author Bishop81
    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]
    Signature

    I'm tired of my signature... Deleted.

    {{ DiscussionBoard.errors[173273].message }}
    • Profile picture of the author Bishop81
      Originally Posted by Bishop81 View Post

      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]
      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.
      Signature

      I'm tired of my signature... Deleted.

      {{ DiscussionBoard.errors[178048].message }}

Trending Topics