I want a .htaccess code to run test.php file from
folder: /public_html/folder/test.php by type example.com/test in address bar instead of example.com/folder/test.php
link : http://example.com/folder/test.php
goal : http://example.com/test
Related
I have a webpage http://example.com. Using the htaccess file I'm redirecting users to the page https://other_domain.com:8081 if they type http://example.com/page in their browser. That works well but the problem is that when redirected, https://other_domain.com:8081 appears in the address bar of the browser. I have added the the following to the top of the htaccess file of the http://example.com webpage but still https://other_domain.com:8081 is shown as the address after redirection:
RewriteEngine On
RewriteRule ^page(.*)$ https://other_domain.com:8081$1 [L,P]
Redirect /page https://other_domain.com:8081
How can this be resolved so that http://example.com/page is shown in the address bar instead of https://other_domain.com:8081?
I want to know, what to write in my .htacess file for rewriting my urls.
I want :
* folder pointed : exemple.com/subfolder
* And the visible url : exemple.com/
Corrections:
I have my domain exemple.com pointing to public_html directory. My website is on exemple.com/subfolder. I want to go to the url exemple.com, I want it to show the content of exemple.com/subfolder but with exemple.com shown as url
Thank you
I need to Redirect my mistyped url into main domain ..
For example if user type mistyped.domain.com or domain.com/mistyped (which does not exists) .It should display the content of domain.com but the url in adress bar should be same as mistyped.domain.com or domain.com/mistyped
Note : I googled and tried some of the .htaccess but its just redirecting.The url in the adressbar is not samejust domain.com not mistyped.domain.com.
Below code worked
./mysite.com
dirs and folders
./m.mysite.com
drwxr-xr-x main_site -> ../mysite.com
I have a website :
http://www.exclusivetech.net/clients/fashion/
If you look at the url then i have not mention any page/file name to be executed, it will display index.php bydefault.. I want it to show page not found error against this and any sub directory if particular filename is not mentioned in any URL .....
Write this in your .htaccess
ErrorDocument 404 /path/to/yourerrorpage.html
I wanted a htaccess file which would set the Default page for a directory and also display the file name in the address bar.
For example:
In general, if index.html is the Index file, then typing the address http://www.example.com/ would be internally loading http://www.example.com/index.html but by default the /index.html is not displayed in the address bar. How can we display it.
Like if user enters http://www.example.com then the address should change to http://www.example.com/index.html
Please Help
Thanks
Redirect from www.example.com to www.example.com/index.html, using mod_rewrite.