my domain is www.yellowandred.in
if user click on yellowandred.in/mainWork/, it should redirect to yellowandred.in/mainWork.php
and if user click on yellowandred.in/mainWork/index or yellowandred.in/mainWork.php/index it should show 404 error,please help.
This is the first link I found in google
http://kb.mediatemple.net/questions/85/Using+.htaccess+rewrite+rules#gs
You may want to try out this tool to help you create an htaccess file:
http://htaccessredirect.net
You will want to do a url "rewrite".
There are others also. Just search "htaccess generator".
Related
I'm trying to create a short and friendly link so that when the server receives the petition it will redirect you to the real link of the website.
Example:
This is the real link: mywebsite.com/profile.php?user=MikeRubio55
And I want it to look like this for sharing purposes: mywebsite.com/MikeRubio55
So what I'm looking for is the server receives this link (mywebsite.com/MikeRubio55) and automatically redirect and display this url (mywebsite.com/profile.php?user=MikeRubio55)
I've been searching for solutions and trying to make some changes to the .htaccess file to achieve this purpose but up until now I've had no success unfortunately.
Thanks in advance for all your suggestions and help.
If any user accessing the wp-login.php page it should redirect to google captache once the captcha has been solved it should show the wp-login.php page
how can i write an .htaccess rule for this ?
you don't need to edit .htaccess file, just install a captcha login plugin like this one
Via an .htaccess directive how to allow visitors to browse the default directory listings and redirect visitors to a login page PHP if they try to download file without being login?
I use Apache and PHP login form with sessions
EDIT: I think I have found a solution with mod_auth_form and mod_session
I solved the problem. It's really nice the help we may not receive here, thank you.
Thanks for taking a look to my question.
Question:
I want my domain to be redirected to other domain, I did this with the help of .htaccess file but the issue is if I try to open the home page its working good but if I open any links cached by Google which is a inner page , it does not work
So for example if my domain is xyz.com and it needs to be redirected to abc.com then if google has cached xyz.com/about.html if i click on it going to google it is searching abc.com/about.html which is not preset on abc.com.
Please help.
Thanks
I can't figure out how can I redirect my home page to different URL. I have found tutorials how to redirect to product or category page but these doesn't work in my case.
For example:
When someone goes to myprestashop.com they will be redirected to myprestashop.com/differentpage
Sorry, if it is very simple, I'm new to prestashop and ecommerce.
You can use the following code to redirect page to another page
From frontend:
Tools::redirect(Context::getContext()->link->getPageLink('abc', true));
If you want to redirect only one page to a specific page, it's better (and also easier) to use .htaccess to do this.
How to Redirect one Page url to another