You are viewing our Forum Archives. To view or take place in current topics click here.
Re-directing on my webiste?
Posted:
Re-directing on my webiste?Posted:
Status: Offline
Joined: Aug 01, 201410Year Member
Posts: 27
Reputation Power: 1
Ok, i want to give out my website for buisness use, but i dont want them to have to type .html on every time they want to go to my page, is it possible to just redirect them to the page, like these for example.
[ Register or Signin to view external links. ] >>>> [ Register or Signin to view external links. ]
[ Register or Signin to view external links. ] >>>> [ Register or Signin to view external links. ]
[ Register or Signin to view external links. ] >>> [ Register or Signin to view external links. ]
if you know what i mean?
thanks
[ Register or Signin to view external links. ] >>>> [ Register or Signin to view external links. ]
[ Register or Signin to view external links. ] >>>> [ Register or Signin to view external links. ]
[ Register or Signin to view external links. ] >>> [ Register or Signin to view external links. ]
if you know what i mean?
thanks
#2. Posted:
Status: Offline
Joined: Apr 15, 201113Year Member
Posts: 614
Reputation Power: 83
make a .htaccess file in the root directory of your website and add the following lines:
You're better of having the homepage be called index.html, it's more traditional. However, if you prefer home.html you would need to add:
URL rewriting is better than redirecting the user. This way the nice url stays in the browse.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
You're better of having the homepage be called index.html, it's more traditional. However, if you prefer home.html you would need to add:
RewriteRule ^$ /home.html [L]
URL rewriting is better than redirecting the user. This way the nice url stays in the browse.
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Aug 08, 201410Year Member
Posts: 70
Reputation Power: 5
Status: Offline
Joined: Aug 08, 201410Year Member
Posts: 70
Reputation Power: 5
When you visit a URL, let's say [ Register or Signin to view external links. ] the /assets is a folder within your httpdocs or htdocs. You have your website within this folder, say you had a folder inside of httpdocs and you wanted it to be called assets, you'd set an index.html
The web server automatically picks up the default URL index.html and redirects your browser. This also helps protect the folders occupants. I'd try the above method, it seems more sophisticated but it's 100% guaranteed to work.
The web server automatically picks up the default URL index.html and redirects your browser. This also helps protect the folders occupants. I'd try the above method, it seems more sophisticated but it's 100% guaranteed to work.
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.