httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "H. Carter Harris" <carter-li...@technettn.net>
Subject RE: [users@httpd] asp conversion more
Date Thu, 16 Sep 2004 16:54:41 GMT
Thanks for the reply Aaron.  You are right on target.

Just for the record I'm running 2.0.48.

The directive works as expected using your syntax.  (Sometimes I wish the
documentation was like the PHP documentation -- loaded with user comments
and more examples.)

I know someone who might know about google.  It couldn't hurt.  Or maybe
I'll get lucky here.

Thanks for your help.




-----Original Message-----
From: Aaron Crosman [mailto:ACrosman@afsc.org]
Sent: Thursday, September 16, 2004 11:26 AM
To: users@httpd.apache.org
Subject: RE: [users@httpd] asp conversion more


I don't remember if you're using Apache 1.3x or 2.0x (and for this I'm
not sure if it matters), but I know under 1.3x the redirect directive
would not work as you wrote it.  The Redirect takes a URL-Path (so no
server name) and sends to a different URL, not URL to URL.

You could try:
Redirect 303  /test.asp
http://www.domain.com/store/index.php?main_page=conditions
Although I think this would still loose any search terms (if the search
engines store them...which I don't know) in the URL since the query
would not be preserved.

As for the rewrite, a) yes it's more complicated b) I'd turn on logging
(if allowed in your environment) and see what it's doing.  Remember to
turn off the rewrite logging when you're done since that log gets big in
a hurry (and can place a fairly large drain on the system as well).
What you're looking for in the log is to see if the pattern isn't
matching right, or if final URL is wrong (or both as is usually the case
the first time I write one of these).

-----Original Message-----
From: H. Carter Harris [mailto:carter-lists@technettn.net]
Sent: Thursday, September 16, 2004 10:28 AM
To: users@httpd.apache.org
Subject: RE: [users@httpd] asp conversion more


I have done some research on the suggestions offerred in this thread and
I want to extend the question a little bit.

The pages under the soon-to-be-prior server were all found by:

www.domain.com/product.asp
www.domain.com/catalog.asp

The pages where these will be redirected are under an application
(zen-cart) running a smarty template so that the pages will be addressed
(simplified
version) like so:

http://www.domain.com/store/index.php?main_page=product
http://www.domain.com/store/index.php?main_page=catalog

There is a one-to-one correspondance between the old pages and the new
pages but the rewrite might be a bit complex.

I tried a RediretPermanent directive as follows:

<VirtualHost 192.168.1.103:80>
DocumentRoot /home/domain_com/public_html ServerName www.domain.com
RedirectPermanent http://www.domain.com/test.asp
http://www.domain.com/store/index.php?main_page=conditions
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} !^www\.technettn\.com RewriteRule (.*)
http://www.domain.com/$1 [R=301.L] Alias /awstatsicons
"/home/domain_com/public_html/icon/"
ScriptAlias /awstats/ "home/domain_com/public_html/cgi-bin/"
Setenv VLOG /home/domain_com/logs
# ErrorLogs /home/domain_com/logs/test2-error_log
</VirtualHost>

Restarted apache but it returned a "404 File not found" error.
I also tried the following:

Redirect 303 http://www.domain.com/test.asp
http://www.domain.com/store/index.php?main_page=conditions

but no joy.

Am I misunderstanding the redirect directive?
What will be lost with search engines that have
www.domain.com/product.asp in their database by using redirect if I can
get it working?





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message