Find Jobs
Hire Freelancers

Apache mod rewrite

$30-100 USD

已取消
已发布超过 17 年前

$30-100 USD

货到付款
Apache url rewrite works in htaccess but not in [login to view URL] The following is a detailed description of the problem taken from a post I made at a forum. servername, IP, email address blocked out with ***. Linux Fedora/php5/Apache1.3.37 Successful bidder will get an exact copy of my [login to view URL] file to work on because I can't have the Apache server continually restarted to test. Payment for successful outcome only. ---- this url: /Keith-Nelson/faves/15/[login to view URL] needs to be rewritten to: /[login to view URL] The following rewrite for this works in an htacces file but not in the [login to view URL]: RewriteEngine On RewriteRule ^[^/]+/faves/([^/]+)/([^/]+).html$ [login to view URL]$1 [L] RewriteRule ^faves/([^/]+)/([^/]+).html$ [login to view URL]$1 [L] Here it is in the [login to view URL] <VirtualHost [login to view URL]:80> ServerAdmin awarner@***.com DocumentRoot /sites/***.com/html ServerName ***.com ErrorLog /var/log/httpd/site3-error_log CustomLog /var/log/httpd/site3-access_log common <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^[^/]+/faves/([^/]+)/([^/]+).html$ [login to view URL]$1 [L] RewriteRule ^faves/([^/]+)/([^/]+).html$ [login to view URL]$1 [L] </IfModule> </VirtualHost> ------ COMMENT:----- You must use RewriteRule ^/[^/]+/faves/([^/]+)/([^/]+).html$ /[login to view URL]$1 [L] RewriteRule ^/faves/([^/]+)/([^/]+).html$ /[login to view URL]$1 [L] instead (note the leading slashes). ------ COMMENT:----- I tried it and restarted server but no luck. I'm going to try something really basic just to make sure rewrite is working ------ COMMENT:----- I tried this, which redirects everything to [login to view URL], and it works: <VirtualHost [login to view URL]:80> ServerAdmin awarner@***.com DocumentRoot /sites/***.com/html ServerName ***.com ErrorLog /var/log/httpd/site3-error_log CustomLog /var/log/httpd/site3-access_log common <IfModule mod_rewrite.c> RewriteEngine On RewriteCond $1 !^([login to view URL]|images|[login to view URL]) RewriteRule ^(.*)$ /[login to view URL]$1 [L] </IfModule> </VirtualHost> ------ COMMENT:----- > but no luck What can you find in your rewriteLog? You can start logging with RewriteLog logs/[login to view URL] RewriteLogLevel 5 ------ COMMENT:----- It's just getting passed through: [login to view URL] - - [06/Nov/2006:08:11:00 -0500] [***.com/sid#9504f74][rid#95f372c/initial] (2) init rewrite engine with requested uri /Dryden-Mitchell/faves/465/[login to view URL] [login to view URL] - - [06/Nov/2006:08:11:00 -0500] [***.com/sid#9504f74][rid#95f372c/initial] (1) pass through /Dryden-Mitchell/faves/465/[login to view URL] <VirtualHost [login to view URL]:80> ServerAdmin awarner@***.com DocumentRoot /sites/***.com/html ServerName ***.com ErrorLog /var/log/httpd/site3-error_log CustomLog /var/log/httpd/site3-access_log common #ErrorDocument 404 /[login to view URL] RewriteLog /var/log/httpd/[login to view URL] RewriteLogLevel 5 <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^/[^/]+/faves/([^/]+)/([^/]+).html$ /[login to view URL]$1 [L] RewriteRule ^/faves/([^/]+)/([^/]+).html$ /[login to view URL]$1 [L] </IfModule> </VirtualHost> ------ COMMENT:----- That means that the line 'RewriteEngine on' is present in per-server context, but the complete ruleset processing (checking the rule-pattern "applying pattern ...") is missing at all. So the RewriteRule directives are missing someway but we know that the virtual host did match, because if not we wouldn't find that log entry (RewriteLogLevel defined only for VirtualHost ******:80). Something other outside the RewriteRule directive must be wrong here.
项目 ID: 104595

关于此项目

9提案
远程项目
活跃18 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
9威客以平均价$62 USD来参与此工作竞价
用户头像
I'm a RHCE (verfication # 804006019622746), having good knowledge on mod_rewrite, I can help you in this. Regards,
$100 USD 在2天之内
5.0 (96条评论)
5.5
5.5
用户头像
Hello I can help you with this.
$70 USD 在2天之内
4.9 (33条评论)
4.7
4.7
用户头像
Happy to help you out straight away. Please see PM for more details.
$50 USD 在0天之内
5.0 (8条评论)
3.9
3.9
用户头像
Hi, Please check PMB. Thank You.
$75 USD 在2天之内
5.0 (2条评论)
3.2
3.2
用户头像
look pm box
$50 USD 在3天之内
5.0 (1条评论)
2.8
2.8
用户头像
I cna fix this for you in no time.
$50 USD 在0天之内
0.0 (0条评论)
0.0
0.0
用户头像
Hi, I can do this for you. Thanks and Regards, Pankaj Agarwal
$30 USD 在1天之内
0.0 (0条评论)
0.0
0.0
用户头像
Details are in the PM.
$30 USD 在5天之内
0.0 (0条评论)
1.0
1.0

关于客户

UNITED STATES的国旗
Washington, United States
5.0
2
会员自9月 29, 2006起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。