SEO Tips : Make SE friendly URLs with htaccess on Apache
/home/yourname/http_folder/
or /local/user/http/public_html/ etc.
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+).html?$ index.php?q=$1 [L
How to write .htacess file?
I know windows notepad cannot let you create a .htaccess file as it requires a file name to store its data. I have two solutions for this.
- Via Cpanel
Log into your cpanel account then click on File Explorer and navigat to public_html folder. here you have to click on create new file link given on to or left panel and name it .htaccess. Then copy above given lines of code in it and save it. - WinSyntax code editor
Download winsyntax code editor (Freeware). It will allow you to save files as .htaccess on windows PC. Then you can upload it to your website with FTP utility.
|
|
|
|
|
|
|
Share |







