You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by pinky goyal <pi...@gmail.com> on 2007/11/07 12:49:04 UTC

[users@httpd] htaccess url redirect problem

Hi All !

I have stuck up due my .htaccess file.

---------------    here in my .htaccess file         ----- ----

Options +FollowSymLinks
RewriteEngine On

########################################
# REDIRECTION FROM NONSECURE TO SECURE #
########################################
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(confirmDetails\.php|transResponse\.php)$
https://devfoundry.com/www3/web/shop/$1 [R=301,L]

########################################
# REDIRECTION FROM SECURE TO NONSECURE #
#########################################
#RewriteCond %{SERVER_PORT} ^443$
#RewriteCond %{REQUEST_URI} !^(confirmDetails\.php|transResponse\.php)$
#RewriteRule (.*)
http://%{HTTP_HOST}%{REQUEST_URI<http://%{http_host}%{request_uri/>}
[R=301,L]

-------------------------------------------------------------------------

i want to redirect url

http://domain.com/www3/web/shop/new.php to
https://domain.com/www3/web/shop/new.php

and url to

http://domain.com.com/www3/web/shop/pay.php to
https://domain.com/www3/web/shop/pay.php

but with this htaccess file when instead redirecting to
https://domain.com/www3/web/shop/new.php  it redirects to
https://domain.com/www3/web/shop/index.php

it's reallly urgent as the deadline is very tough.

can anyone please help me out what is the problem.

lot of thanx in advance

pinky

Re: [users@httpd] htaccess url redirect problem

Posted by Joshua Slive <jo...@slive.ca>.
On Nov 7, 2007 6:49 AM, pinky goyal <pi...@gmail.com> wrote:
> Hi All !
>
> I have stuck up due my .htaccess file.
>
> ---------------    here in my .htaccess file         ----- ----
>
> Options +FollowSymLinks
> RewriteEngine On
>
>
> ########################################
> # REDIRECTION FROM NONSECURE TO SECURE #
> ########################################
> RewriteCond %{SERVER_PORT} !^443$
> RewriteRule ^(confirmDetails\.php|transResponse\.php)$
> https://devfoundry.com/www3/web/shop/$1 [R=301,L]
>
> ########################################
> # REDIRECTION FROM SECURE TO NONSECURE #
> #########################################
> #RewriteCond %{SERVER_PORT} ^443$
> #RewriteCond %{REQUEST_URI} !^(confirmDetails\.php|transResponse\.php)$
> #RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
>
> -------------------------------------------------------------------------
>
> i want to redirect url
>
> http://domain.com/www3/web/shop/new.php to
> https://domain.com/www3/web/shop/new.php
>
> and url to
>
> http://domain.com.com/www3/web/shop/pay.php to
> https://domain.com/www3/web/shop/pay.php

Your examples above don't say anything about "pay.php" or "new.php".
If you gave us some consistent examples, and perhaps RewriteLog
output, we would be more likely to be able to help.

Joshua.

---------------------------------------------------------------------
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