Wednesday, 15 August 2012

php - Redirect only one page to http htaccess -



php - Redirect only one page to http htaccess -

i utilize codeigniter , utilize redirection urls https. want redirect 1 page (https://www.example.com/campaign/pprtasshs-dhshs_fd5656dfhdh/web/surf) http.

i got lots of reply in so. not implement properly. each time got error "this webpage has redirect loop".

my htaccess

<ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewritecond %{https} off # first rewrite https: # subsequent rule grab it. rewritecond %{server_port} 80 rewriterule ^(.*)$ https://%{http_host}%{request_uri} [l,r=301] # now, rewrite request wrong domain utilize www. rewritecond %{server_port} 443 rewritecond $1 (web\/surf|surf) rewriterule ^(.*)$ http://%{http_host}%{request_uri} [r=301,l] rewritecond %{http_host} !^www\. rewriterule ^(.*)$ https://www.%{http_host}%{request_uri} [l,r=301] rewriterule ^about-us / [l,r=301] options -indexes rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /index.php/$1 [l] </ifmodule> <ifmodule !mod_rewrite.c> errordocument 404 /index.php </ifmodule>

links on tried not working me.

codeigniter: check , forcefulness 1 page https://

redirect single page http https

thanks in advance

you have alter status @ https redirection.and check status @ https://www redirection.just seek next code. may help you.

<ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewritecond %{https} off # first rewrite https: # subsequent rule grab it. **rewritecond $1 !(web\/surf|surf)** rewriterule ^(.*)$ https://%{http_host}%{request_uri} [l,r=301] # now, rewrite request wrong domain utilize www. rewritecond %{server_port} 443 rewritecond $1 (web\/surf|surf) rewriterule ^(.*)$ http://www.traffictraject.com/$1 [r=301,l] rewritecond %{http_host} !^www\. **rewritecond $1 !(web\/surf|surf)** rewriterule ^(.*)$ https://www.%{http_host}%{request_uri} [l,r=301] rewriterule ^about-us / [l,r=301] options -indexes rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /index.php/$1 [l] </ifmodule> <ifmodule !mod_rewrite.c> errordocument 404 /index.php </ifmodule>

php .htaccess codeigniter redirect

No comments:

Post a Comment