I have this location
http://somesite.com/pot_system.shtml
and i want to redirect to
http://somesite.com/build_me_today
I want to do this via htaccess is that possible
I used
Redirect /pot_system.shtml http://somesite.com/build_me_today
Simplest way:
Redirect /pot_system.shtml /build_me_today
Using a 301 redirect:
Redirect 301 /pot_system.shtml /build_me_today
#Matt:
Options +FollowSymLinks
RewriteEngine on
RewriteRule /pot_system.shtml http://somesite.com/build_me_today [R=301,L]
Related
I have a problem with .htaccess redirect:
in my site, I already have a file htaccess with this strings:
RewriteEngine On
RewriteRule ([^/\.]+)/page/?$ cms.php?lang=$1&livello1=page [L,QSA]
and I want to do redirect from "http://example.com/it/page" to "http://newexample.com/negozio/page1".
My code for redirect is:
#REDIRECT
Redirect /it/page http://newexample.com/negozio/page1
When I try to do this, the redirect becomes
http://newexample.com/negozio/page1?lang=it&livello1=page.
How can I delete "?lang=it&livello1=page"?
Does "?lang=it&livello1=page" originate from my .htaccess?
Sorry,
but I found no solutions on google.
Thank's.
Add a ? at the end of the redirect:
#REDIRECT
Redirect /it/page http://newexample.com/negozio/page1?
I am trying to do a 301 redirect via htaccess from http://www.domainname.co.uk/%C2%A0/ to http://www.domainname.co.uk/ but i can not get it to work
I am having a lot of trouble with the /%C2%A0/ any help with this would be great
thanks
Try:
RewriteEngine On
RewriteRule ^\xC2\xA0/?$ / [L,R=301]
Or if you have to use mod_alias:
RedirectMatch 301 ^/\xC2\xA0/?$ /
I need to redirect a large amount of urls that are very similar to a single url so an example would be;
engagement-rings/marquise-cut-diamond-engagement-rings-4.html
engagement-rings/marquise-cut-diamond-engagement-rings-5.html
engagement-rings/marquise-cut-diamond-engagement-rings-6.html
engagement-rings/marquise-cut-diamond-engagement-rings-7.html
Would need to redirect to
/engagement-rings/marquise-cut-diamond.html
is there a simple bit of code that I could use to redirect?
e.g
Redirect 301 /engagement-rings/marquise-cut-diamond-engagement-rings-(*).html http://www.website.co.uk/engagement-rings/marquise-cut-diamond.html
Redirect directive doesn't accept Regular Expressions.
Use RedirectMatch directive instead:
RedirectMatch 301 (engagement-rings/marquise-cut-diamond).+?\.html$ /$1
OR else you can use this mod_rewrite rule in your DOCUMENT_ROOT/.htaccess file:
RewriteEngine on
RewriteRule ^(engagement-rings/marquise-cut-diamond).+?\.html$ /$1 [L,NC,R=301]
I want to redirect "adm" folder to "administrator"
my .htaccess code:
Redirect 301 /adm /administrator
But i go to the url:
http://www.mywebsite.com/home2/myuser/public_html/administrator
How to do this correctly?
Can RewriteRule with flags [R=301,L] do the work? Because I go to the same page with RewriteRule or Redirect
Thanks.
So this may not be a problem of your rewrite rules but maybe something wrong about your configuration.
Anyway try a rewriterule like this:
RewriteRule ^/adm(/(.*))$ /administrator$1 [QSA,R=301,NC,L]
RedirectMatch directive would do
RedirectMatch permanent /adm(.*)$ http://www.mywebsite.com/administrator$1
I'm looking for help with making a 301 redirect for:
www.domain.com/word/* to www.domain.com/*
RewriteEngine On
RewriteRule ^/?word/(.*) http://sitename.com/$1
Redirect 301 /word /