[UE] Facing issue with mod rewrite in lighttpd 1.4
Added by psdhawad 10 months ago
Hello,
Firstly sorry but I am beginner so I would really appreciate your help. I am using lighttpd/1.4.55 freshly install it on ubuntu 20.04 of vps v2core
Using cms (no matter which wordpress or other scripts) facing error of 404 on other pages because of .htaccess as it dont work in lighty I am really impress by this server and would love to always work on this but even after trying mod rewrite facing same.
Below is htaccess for script
Options +FollowSymLinks -Indexes # Turn on URL rewriting RewriteEngine On # Installation directory # RewriteBase / # Allow any files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f # Rewrite all other URLs to index.php/URL RewriteRule ^(.*)$ index.php?path=$1 [NC,L,QSA] <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/opentype BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html Header append Vary User-Agent env=!dont-vary </IfModule> <IfModule mod_security.c> SecFilterScanPOST Off </IfModule> ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType application/pdf "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresDefault "access plus 2 days" </IfModule>
My lighttpd.conf file : https://paste.lighttpd.net/LC#4ze7ifnPa7mX3gRe2wrfKrC8
also my domain.conf file(for vhost in conf-available & enabled folder) : https://paste.lighttpd.net/MC#hhg2M3S0Pz4L9MgsZY4eAdfX
I read mod_rewrite and howto also still stuck and please consider me beginner and help me
Thank you!
Replies (1)
RE: Facing issue with mod rewrite in lighttpd 1.4 - Added by gstrauss 10 months ago
Firstly sorry but I am beginner so I would really appreciate your help.
Beginners with basic reading comprehension are welcome here. Those without exercising basic reading comprehension are pointed back at the documentation.
You "tried" to provide your config, but you failed to execute the commands in How to get support
There are only three commands in all of 15 lines of text, and the commands are highlighted.
I am using lighttpd/1.4.55 freshly install it on ubuntu 20.04 of vps v2core
lighttpd 1.4.55 is very old. Ubuntu 20.04 is very old (over 3 1/2 years old). If you're just starting out, maybe choose to start with a modern stable release of Ubuntu? Ubuntu 23.10 (Mantic Minotaur) was released last month.
The rewrite rule you need to use is an exact example in mod_rewrite. Try reading it again? url.rewrite-if-not-file
You seem not to know what a "question" is, so please use a search engine "what is a question?". (You were told this in https://redmine.lighttpd.net/boards/2/topics/11240, too)