Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Help converting a IIS rewrite rule to mod_rewrite
Post Flair (click to view more posts with a particular flair)
Post Body

Hi,

I have just started using apache and am having a problem with my URL rewriting.

Can anyone show me where I am going wrong here?

IIS Rule

<rule name="banillaCMScatchAll" stopProcessing="true">
    <match url="^(. )$" ignoreCase="false" />
    <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="index.cfm?string={R:1}" appendQueryString="true" />
</rule>

My Attempt for Apache

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName mywebsite.co.uk
    ServerAlias www.mywebsite.co.uk
    DocumentRoot /var/www/mywebsite.co.uk/html/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(. )$ index.cfm?\string=$1 [QSA]
    RewriteCond %{SERVER_NAME} =mywebsite.co.uk [OR]
    RewriteCond %{SERVER_NAME} =www.mywebsite.co.uk
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<Directory />
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
        DirectoryIndex index.cfm
</Directory>

any help hugely appreciated

Author
Account Strength
90%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
691
Link Karma
293
Comment Karma
398
Profile updated: 1 day ago
Posts updated: 2 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
6 years ago