Ask for help writing a RewriteRule.


New Member
Ask for help writing a RewriteRule.
Apache rules.
I have been using openlitespeed for two days now.
It is still novice. Ask for help. Fix it for openlitespeed. Please.

On the Apache server it looks like this:

In openlitespeed it should look like this:

I want to make it appear like an Apache server.

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On

# Get rid of index.php
RewriteCond %{REQUEST_URI} /index\.php
RewriteRule (.*) index.php?rewrite=2 [L,QSA]

# Rewrite all directory-looking urls
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*) index.php?rewrite=1 [L,QSA]

# Try to route missing files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} public\/ [OR]
RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
RewriteRule . - [L]

# If the file doesn't exist, rewrite to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]


# sends requests /index.php/path/to/module/ to "index.php"
# AcceptPathInfo On

# @todo This may not be effective in some cases
FileETag Size

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascr$


On your OLS server, it should look like as well when you install your application correctly to your document root /blog folder.

It should not be a rewrite stuff, more like initial configuration. What's your application? How did you install it? What's the URL?

You should get work first on OLS. there should be non index.php under doc root, only /blog/index.php


New Member
blogs is not a real directory. The installed solution has full control over index.php.

Thank you.
I solved this problem.