English 中文(简体)
我如何将“语言压力”与“htaccess redirect”结合起来?
原标题:How do I combine WordPress permalink code and .htaccess redirect?

I m试图将以下法规结合起来,以便把“压力”与主编、交战者.com(顶级代码)和第二个领域,即布罗斯特.com(下级代码)的工作转向次流式交战者。

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

RewriteEngine On 
RewriteCond %{HTTP_HOST}  burrowpress.com$ [NC]
RewriteCond %{REQUEST_URI} !^/burrowpress/.*$
RewriteRule ^(.*)$  /burrowpress/$1

如今,每条链路都在“压力”和“直接工程”中工作,但图像必须直接与交战者.com/burrowpress/images/而不是“压力”。

最佳回答

你们需要放弃你们的法典。 《语言压力规则》上的[L] 旗帜下,正在其代码中停止按该行执行该档案,因为你的特别途径是“绕过”《语言:>:声明:

RewriteEngine On 
RewriteCond %{HTTP_HOST}  burrowpress.com$ [NC]
RewriteCond %{REQUEST_URI} !^/burrowpress/.*$
RewriteRule ^(.*)$  /burrowpress/$1 [L]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

页: 1 关于 声明,但鉴于语言压力能够重写你的<代码>.htaccess文档(取决于您是如何设置的)你可能希望离开。 如果你手工更新你的档案,你可以删除第2条<编码>。

<>进口部分是,我把你的特别规则放在言语前面。

问题回答

I m 不是专家,而是说不需要列入<代码>。 RewriteEngine 在上,如果发言,你可以将改头代码放在其中两次。 因此,你想要转向次地主,但是没有把你的形象保存在次地主?





相关问题
Ignore symlinks in clean URL s in .htaccess

Example URL: example.com/user /user is both a symlinked directory and a valid URL to content on my site. I user Horde Routes to request the content and all requests to the site go through index.php. ...

.htaccess File Options -Indexes on Subdirectories

I have the following .htaccess line, simple no indexes on root. Options -Indexes What do we add so it propagates to any sub directory instead of having to create one file for each? One .htaccess on ...

Mod Rewrite ignoring -d

After a day or two, I am still fighting with Mod Rewrite. It seems that 60% of my development time is spent battling the server. My current URL structure is such that all http://example.com/xyz and ...

ErrorDocument 404 Not Sending Referrer Information: PHP

I m using a standard htaccess ErrorDocument 404 to redirect users to a new page. In order to customize the 404, I need to know their referrer information (from the page they Tried to visit). $...

Find all htaccess files on server [closed]

I m looking for a Linux command to go through all the directories on my server and find all .htaccess files. The output would be a list of all those files with full path, creation/modification date ...

301 Redirect Help with Dynamic URL s and Multiple Id s

I just did a redesign for www.wildchildclothes.com which has a new URL structure. The old site ran on Zen Cart and had a bad URL structure. Here are some examples of what I want to redirect from: OLD:...

热门标签