English 中文(简体)
.htaccess mod-rewrite 页: 1
原标题:.htaccess mod-rewrite -- Not Redirecting

Okay, so I have a script that works like adf.ly; you submit a URL, the Url is shortened and then an interstitial advertisement shown before you re taken to your URL. I have the following .htaccess located in the root:

DirectoryIndex index.php

FileETag none
ServerSignature Off

Options All -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^([0-9a-zA-Z]{1,6})$ fly/?to=$1 [L]
RewriteRule ^([0-9]{1,9})/banner/(.*)$ fly/?uid=$1&adt=2&url=$2 [L]
RewriteRule ^([0-9]{1,9})/(.*)$ fly/?uid=$1&adt=1&url=$2 [L]
</IfModule>

The script isising the shortURL s (you cantries here: http://www.twitsym.com/short/) 然而,这并不转而飞行。 php,然后是最后的URL。 我很可怕,没有知识。 谁能对我说出什么可能会造成问题?

名录结构是:

.../
.../fly/index.php

再次感谢你,斯克拉奥维尔!

问题回答

it seems that you will need the LogLevel directive somewhere in your httpd.conf or vhost.conf if this is a virtual server. See this post for a similar question. The code would be:

RewriteLogLevel 3
RewriteLog "/usr/local/var/apache/logs/rewrite.log"

Where is the htaccess supposed to be redirecting to (i.e. which URL should lead whereto?) Additionally, you asked for being redirected to fly.php, however it does not occur in your .htaccess. Was this your intention?





相关问题
How to use redirect_to to a non-Rails URL with query params?

We just had an existing use of redirect_to break due to a Rails upgrade, and it led to a question. I ve been experimenting, and I don t seem to find a way to use redirect_to to send the user to a non-...

Apache authentication: Redirect on failure, reliably?

I ve set my ErrorDocument 401 to point to my website s account creation page, but not all browsers seem to honor this redirect (Safari). Also, other browsers (Firefox, Chrome) never quit asking for ...

Response.Redirect HTTP status code

Why is it that ASP/ASP.NET Response.Redirect uses a HTTP-302 status code ("Moved Temporarily") even though in most cases a HTTP-301 status code ("Moved Permanently") would be more appropriate?

Exceptions: redirect or render?

I m trying to standardize the way I handle exceptions in my web application (homemade framework) but I m not certain of the "correct" way to handle various situations. I m wondering if there is a ...

Cakephp is not redirecting properly when pages are cached

I am having some issues with a site that was working correctly until i implemented full page caching in CakePHP. I have followed the guidance in the Manual and have my $session->flash in a no-cache ...

热门标签