mod_rewrite

Discussion in 'Apache' started by Jamie Forster, Jun 17, 2013.

  1. #1
    Hi there folks

    I have a rewrite set up like this:

    RewriteCond %{HTTP_HOST} !^www\.domainname\.co.uk
    RewriteRule (.*) http://www.domainname.co.uk/$1 [R=301,L]

    How would I go about either adding to this or modifying it so that any request for the index.php page always shows as http://www.domainname.co.uk/index.php

    ?

    Thanks in advance

    Jamie
     
    Jamie Forster, Jun 17, 2013 IP
  2. Marcel Preda

    Marcel Preda Member

    Messages:
    21
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    43
    #2
    Hi Jamie,

    But those cond and rule should do already what you want.
    I gues that you have multiple domains/subdomains.

    I've try to write some examples here, but for some reason I'm not allowed to write any URL like string :(

    BR,
    Marcel
     
    Marcel Preda, Jun 19, 2013 IP