SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Wizard Zaggs's Avatar
    Join Date
    Feb 2005
    Posts
    1,051
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple rewriterule not workin

    Hi,

    I have the following simple rewriterule which isn't working. Anyone can point me in the right direction?

    PHP Code:
    RewriteEngine on
    RewriteRule 
    ^newsnews.php 
    Thanks.

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Zaggs,

    That code is okay provided you are on an Apache 2.x server and there is no other conflicting code.

    Be sure to test, though, by adding flags to your code - I recommend [R=301,L] where the R=301 will tell the server to display the redirection and L tells Apache to go do it. If it works, then you can remove the R=301 (and the comma separator).

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

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