English 中文(简体)
轻度沉积转换?
原标题:Lighttpd rewrite conversion?

因此,我试图把一个地点推向灯塔,但我看不出是否正确了URL。

RewriteRule ^portfolio/([^/]+) /index.php?portfolio=$1 [NC]

RewriteCond $1 ^(portfolio|news|about|contact|home|P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]

我尝试了几个组合,但没有结果:

"^/(?!portfolio)(.+)/?$" => "/index.php?portfolio=$1"
"^/portfolio/(d+)(?:?(.*))?" => "/index.php?portfolio=$1"
最佳回答

我认为,这将有利于你们:

"^(/portfolio/.*)$" => "/index.php?portfolio=$1"

这将把所有ur改成指数,如:com/portfolio/123?portfolio=123。

仅用^(*)美元将任何东西改写到ur

问题回答

暂无回答




相关问题
Lighttpd: How to password-protect URLs matching regex

Is there a convenient way to password-protect URLs which match a certain pattern in Lighttpd? I thought about matching regex, but any other creative solution will be nice. NOTE : I m not looking for ...

Lighttpd/FastCGI treating routes as static content

I ve come across a frustrating issue with FastCGI and Rails whereby lighttpd is treating routed url s as static files (i.e. not sending them to rails since it believes they re static) If I hit the ...

Django and PHP together with lighttpd?

I m playing around with Django and have built my personal homepage in Django, but I want to use my wordpress blog as a path. For example if I want to path /blog/ in Django or in lighttpd so it will ...

Some files won t stream from lighttpd to Droid

We are running into some odd issues with streaming certain files in our app. After lots and lots of testing we ve narrowed it down to what seems like some sort of issue between lighttpd and Droid, and ...

fastcgi, cherrypy, and python

So I m trying to do more web development in python, and I ve picked cherrypy, hosted by lighttpd w/ fastcgi. But my question is a very basic one: why do I need to restart lighttpd (or apache) every ...

热门标签