Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2009
    Posts
    152
    Thanks
    8
    Thanked 0 Times in 0 Posts

    url redirection and rewrite in .htaccess

    who can tell me when to use url redirection or url rewrite in .htaccess.what difference between these. any tips would be appreciated.

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Usually you use redirection when you want to send someone off-site, switch from HTTP to HTTPS, or you have moved a page and want to maintain SEO without getting hit for default content. Rewrites are usually used when you want to conditionally match a server variable, such as the URL, and alter the request, or send the traffic to another page without showing the user. This is of course just the general usage -- you can do a lot more with rewrites, and .htaccess directives.

  • #3
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what's up bruh... you really know your stuff, I read your help on some tough subjects. anyways I was wondering if you could help me on a simple but very frustrating topic for me. I think you covered it briefly, but it's make seo friendly urls using .htaccess.

    If I want to change www.myarcadeshack.com/index.php?action=register to be www.myarcadeshack.com/register

    how would I do that...
    alot of websites told me to write something with index.php=action, something like that, but I think that's only if you only have one smart urls. My .htaccess file is full of urls that need proper configuration. There are ^Register, ^links ^tradelinks, etc...a bunch. So keep in mind, there is a list of url's with rewrite. I have tried a dozen websites, and I know trying that many should yield results, but I think it might be a permissions issue. I have been able to successfully redirect the non www page to www, using 301 redirect in .htaccess, so since this worked, I'm not sure it is entirely a permission's issue. So help, PLEAAASSSSEEEEE...this is the only issue keeping me from taking my website live on google, and other search enginess. My website is www.myarcadeshack.com if you want to play some games and click on ads. It's only in its infancy but it's growing...errr at least when I get this issue resolved...
    Thanks again for your time

  • #4
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try this:

    Code:
    RewriteEngine On
    
    ## Registration Rewrite Rule
    RewriteRule ^([a-z_]+)/ index.php?action=$1


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •