NurdTurd
(Nurd Turd)
1
# Pretty Permalinks
RewriteRule ^(images)($|/) - [L]
RewriteCond %{REQUEST_URI} !^action=logout [NC]
RewriteCond %{REQUEST_URI} !^action=login [NC]
Options +FollowSymLinks -MultiViews
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !index\.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?filename=$1 [NC,QSA,L]
I’m not the best with porting it over. Any help is greatly appreciated!
jacob
(Jacob Hands)
2
Something like
example.com {
rewrite {
r ^(images)($|/)
to {2}
}
rewrite {
rewrite {
r ^(.*)$
if {path} not_has index.php
to index.php?filename={1}
}
}
}
Pretty sure Go doesn’t follow symlinks at all though So that part will break.
Also the second one is a start but I’m not sure quite how to convert the request_filename bit.
See docs for rewrite
NurdTurd
(Nurd Turd)
3
I get
2016/07/07 12:40:33 Caddyfile.domain.com:22 - Parse error: Wrong argument count or unexpected line ending after 'rewrite'
Line 22 is the one with the ***
's
...
rewrite {
r ^(images)($|/)
to {2}
}
rewrite {
**rewrite {**
r ^(.*)$
if {path} not_has index.php
to index.php?filename={1}
}
}
}
matt
(Matt Holt)
4
The nested rewrite looks like an accident.
rewrite {
r ^(.*)$
if {path} not_has index.php
to index.php?filename={1}
}
1 Like
cekvenich
(vic cekvenich)
5
Hi, can I get help also? I’m using firebase now for hosting, like this:
{
“source”: “**”,
“destination”: “/index.html”
}
What it means is if you don’t find it, go to index.html or /.
But if there is html, or img or css or js or such than load it.
cheers.
matt
(Matt Holt)
6
@cekvenich Hi vic, I’m sure someone will help you in your other thread if they know the answer. Let’s keep this thread on-topic.
NurdTurd
(Nurd Turd)
7
It’s alright guys. I gave up on figuring it out.
system
(system)
Closed
8
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.