I have a website hosted on "xyz.com". In that website, for urls with "xyz.com/cnapi/...", I am redirecting the requests to "abc.com:3000/...".
To do so, I have created following rule
The regex I am using is cnapi/?(.+)$. I tested the pattern for "xyz.com/cnapi/default.html", and it worked.
But when I enter same url (xyz.com/cnapi/default.html), it doesn't redirect. It displays default.html instead of redirecting to google.com.
P.S. My final redirect will be "http://ipaddress:3000/...". For now, I am using google.com to test the redirect.
Related
I m trying to redirect 403 forbidden url to homepage but not able to redirect.
Here is what i have tried in .htaccess
Redirect /ru-1/.html https:://test.com
But it't not working i did same for othere URL and it was worked.
I think the problem is /.html part it is without prefix page name.
can anyone please guide me on this.
I have a site which you can access with or without https rule. So, I need to make a redirect to another page. Example:
My website is: www.google.com so I can access by the moment as https://www.google.com and http://www.google.com but I need when you get into my website trough http or https way you must have to redirect to www.yahoo.com.
Besides I need the url redirection too to any subdomain or url which exists in http://www.google.com or https://www.google.com
How can I do this? I have no found alredy information about it in S.O. Thanks.
Very simple. You can use the following Redirect in your htaccess to redirect all requests from your site to the other domain
RedirectMatch 301 / http://yahoo.com/
I tried to put a redirect in a my website for CEO (Search Engine Friendly )
i put a code in .htaccess , then i checked here http://www.webconfs.com/redirect-check.php , so it said : (Found redirect to http://www.abosurfmorocco.com/. The Redirect is Search Engine Friendly.), but when i went to the website i got a Redirect Loop error in the browser, i deleted this code in .htaccess, i cleaned browser cookies , but i still can get to the website.
is there is way to resolve this problem , please
I think there is still a 301 Redirect. Check again if there isn't any .htaccess file.
Moved Permanently: http://www.abosurfmorocco.com/ --> http://www.abosurfmorocco.com
I'm looking to 301 redirect an URL from a old version of a site no longer being used to a new URL that has been created in fresh Drupal installation.
Old URL: /198/our-software/
New URL: /services/software-development/
In the .htaccess located in the root directory of Drupal I have added the following:
redirect 301 /198/our-software/ http://www.domain.com/services/software-development
The redirect is working to some extent, it sends the user to a url like below with a query string appended to the end of it, which results in a 404 error:
http://www.domain.com/services/software-development?q=198/our-software/
I have tried placing the redirect at both the start and end of the .htaccess file both result in a 404 page not found error.
Do I need to use a more complex redirect to get around Drupals URL rewrite?
NOTE: I'm using the Pathauto module.
Rather than edit the .htaccess directly, just install the Path Redirect module which has that exact functionality built in.
Note that the Path Redirect module is only available for Drupal 6 (as of 2/22/12)
I got it working with using "RewriteRule" instead, AND (important!) removing the leading slash in the source URL, so in your case:
RewriteRule 198/our-software/ http://www.domain.com/services/software-development [R=301,L]
I have two inbound links that land on 404 pages because the links are squiffy. I have tried 301'ing these links as normal but without success, I believe because of the characters used from this external URL.
Column<u>Radiators.html
is the page suggested on this external site and
Column_Radiators.html
is the actual page.
also
Bath%3Cu%3EFiller.html
on the external site and
Bath_Filler.html
on our actual website.
How can I succesfully redirect these pages?
Simply add these lines in your .htaccess
redirect 301 /Column<u>Radiators.html /index.html
redirect 301 /Bath<u>Filler.html /index.html
Note: I use index.html as the default redirection but you can use a custom 404.