Ask for help writing a RewriteRule.

pcware

New Member
#1
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:
example.com/blog

In openlitespeed it should look like this:
example.com/index.php/blog

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]

</IfModule>

# 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$
</IfModule>
 

Pong

Administrator
#2
On your OLS server, it should look like example.com/blog 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 example.com/blog work first on OLS. there should be non index.php under doc root, only /blog/index.php
 

pcware

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

Thank you.
I solved this problem.
 
#4
On your OLS server, it should look like example.com/blog 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 example.com/blog work first on OLS. there should be non index.php under doc root, only /blog/index.php
Thanks for the information!
 
Top