ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

rewrite newb - leave a file alone (Google Site Verification file)

December 18, 2012 2:56pm

Subscribe [2]
  • #1 / Dec 18, 2012 2:56pm

    lelkins001

    9 posts

    I’m very new to the concept of rewrites and have applied the following I found on the internet to help remove index.php from my URLs:

    #StatusInquiry ON RemoteOk
    #RewriteLog c:\temp\iirf
    #RewriteLogLevel 2

    #Change the following to your renamed system folder path:
    RewriteRule ^/system/(.*)$ /system/$1 [I,L]

    #Add rules for folders you want to accept without rewriting:
    RewriteRule ^/images/(.*)$ /images/$1 [I,L]
    RewriteRule ^/styles/(.*)$ /styles/$1 [I,L]
    RewriteRule ^/themes/(.*)$ /themes/$1 [I,L]
    RewriteRule ^/-/(.*)$ /-/$1 [I,L]
    RewriteRule ^/FPO/(.*)$ /FPO/$1 [I,L]
    RewriteRule ^/documents/(.*)$ /documents/$1 [I,L]

    #This allows querystring to be added to the url (like {path=logout} )
    RewriteRule /(.*)\?(.*)$ /index.php\?q=$1&$2 [I,L]

    #This removes index.php? from the urls
    RewriteRule ^/(.*)$ /index.php?/$1 [I,L] 


    What I can’t figure out is how to ignore the rewrite for specific files.  Ex:  A google-site-authentication file that needs to be placed in the root directory (googlexxxxxxxxxxxx.html) or a Bing-site-authentication file (BingSiteAuth.xml.

    I have these files in my root folder, but typing in the url takes me to my EE site’s homepage.

    please help!
    Lee


    someone told me to try this, but it still just goes to the homepage
    RewriteRule ^/google.*.html$ /$1 [I,L]

  • #2 / Dec 18, 2012 4:49pm

    ctmaloney

    12 posts

    Use this: http://ellislab.com/expressionengine/user-guide/urls/remove_index.php.html

    It will just remove the index.php from the url, but existing files/folders can still be accessed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases