Current URL is
http://example.com/news/club/teamname
(Actual file is in this path only need to change URL)
I want to changed to
http://example.com/team/teamname
Using htaccess, its a wordpress site. I can't change the permalink.
Related
I want to redirect my url from one path to another
My website url : www.example.com/signup/generate/dashboard/index.php
but I want my website url as : www.example.com/login
how can I achieve this using .htaccess
I use from http://siteold.com/json/ in my application and can not change it.
and my new domain is http://panel.sitenew.com/json/ . how redirect my old url to new url without change in application ?
this way does not work (in siteold.com) :
RewriteEngine On
Redirect http://siteold.com/json/ http://http://panel.sitenew.com/json/
I don't think it is possible to redirect a URL to another URL. You will have to create a htaccess.txt file to the directory of the website you want to redirect, and then use this code
Redirect /siteold.com/json/ http://panel.sitenew.com/json/
This will redirect the old file path to the new file path. You cannot add http:// to the origin domain as the code doesn't work like that.
Source
I have a URL http://domain.com/foo/bar/100. I want to remove /foo/bar from the URL without redirecting it.
Please help me with this problem as I am new for htaccess.
is this URL created by .htaccess rules?
if not: change your document root or add a location directive to the server.
I want to redirect url in magento. I am using "URL rewrite Management".
We want this path "/index.php?cPath=1" redirect to "baby-prams-strollers.html" this path.
I have entering data this type
Request Path * index.php?cPath=1
Target Path baby-prams-strollers.html
But it will be redirect on homepage. we want to redirect on baby-prams-strollers.html this path. How can we do this? Please advice me.
If we have entered this type of data
Request Path * ?cPath=1
Target Path baby-prams-strollers.html
Now it will be redirected on "baby-prams-strollers.html" this path but url is coming with index.php/baby-prams-strollers.html. Now we don't need index.php in URL. How can we remove index.php in this URL. We have already removed index.php in our all url. but when we redirection of this type url that time it will be added url in index.php.
Thanks in advance.
You need to add to your .htaccess file in your Magento root folder soomething like this:
RedirectMatch 301 /index.php?cPath=1(.*) /baby-prams-strollers.html$1
I have fully static website, now I want to change this website to dynamic. But problem is that static website having good traffic and I do not want to lose that traffic. For the dynamic website I already rewrite the URL using htaccess for SEO reasons. I want to redirect the static url to the rewritten url (which was written by my .htaccess).
(A) Static URL :
www.website.com/examples/java/datatype/boolean/printbooleanvalue.html
(B) Original Dynamic URL:
www.website.com/examples.php?language=?java&category=data-type&subcategory=boolean&exampleurl=print-boolean-value
(C) Rewritted Dynamic URL :
www.website.com/examples/java/data-types/boolean/print-boolean-value
So I want to redirect URL(A) to URL(C). Is there any way to do this ?
You can hardcode the mod rewrite to load the php file when the html file is called.
The SEO friendly url that you have created in your .htaccess is redundant. Instead of the SEO friendly URL, use the same url as your original site.
For example in your .htaccess file write the rule like
RewriteEngine On
RewriteBase /
RewriteRule examples/java/datatype/boolean/printbooleanvalue.html$ /examples.php?language=?java&category=data-type&subcategory=boolean&exampleurl=print-boolean-value [L]
This will load the php file whenever the original html file is requested and it will use the same url as the older one.
Hope that helps.
Your .htaccess code:
Redirect /examples/java/datatype/boolean/printbooleanvalue.html http://www.website.com/examples/java/data-types/boolean/print-boolean-value
In any case you run into the need to redirect:
Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.html