English 中文(简体)
ht接入 401 重置工作不当
原标题:htaccess 401 redirect is not working properly

我正在试图写一个连接代码, 以便重定向到特定的页面。 但是它现在不起作用 。 请参看完整的连接代码 。

RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+)/([w.,]+)/([w.,]+)/([w.,]+)/([w.,]+)/([w.,]+)/([w.,]+)$ job.php?j=$1
RewriteRule ^([a-zA-Z0-9]+)/([w.,]+)/([0-9]+)$ sameIndustryJobs.php?i=$1&c=$2&p=$3
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([w ,]+)/([0-9]+)$ sameCatagoryJobs.php?c=$1&s=$3&p=$4
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([w.,]+)/([0-9]+)$ sameCityJobs.php?c=$1&cn=$4&p=$5
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([w.,]+)/([0-9]+)$ sameQualificationJobs.php?q=$1&cn=$5&p=$6
ErrorDocument 401 sorry.php

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
问题回答

您应该将 < code> [L] 放在您拥有的每一条重写规则线的末尾。 旗子 < code> > L 指向 Apache 表示规则结束的最后一条 。





相关问题
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:...

热门标签