1

In my website I have something like this:

example.pl/index.html and example.pl/gallery.html

I would like to make url alias with htaccess like:

example.pl/homepage and example.pl/gallery

I've found the solution to delete .html but i would like to rewrite index with something else.

RewriteEngine On
RewriteBase /
RewriteRule ^page$ /subfolder/subfolder/thepage.php [L]

This solution i've found here for php problem doesn't work for me. Moreover should i place .htacess file in public_html folder or home hosting directory? (I do not use php and database for this simple website).

Cœur
  • 37,241
  • 25
  • 195
  • 267
fremek
  • 11
  • 2

1 Answers1

0

Here is what you can do:

RewriteEngine On
RewriteRule ^homepage /subfolder/subfolder/index.html [L]
RewriteRule ^gallery /subfolder/subfolder/gallery.html [L]

.htaccess file should stay in the folder where you have index.html and gallery.html files.

moonflare
  • 279
  • 1
  • 4
  • 11