Thanks for your replay. but Inside public_html directory I have a subfolder and I have created index.php in that folder.
All my site url showing
http://domainname.com/subfolder/pagename
I want it to rewritten as
http://domainname.com/pagename
What rule should I write in .htaccess to show the “http://domainname.com/pagename”
After you let WP take over you go into Settings>Permalink and change your structure. 🙂
we can’t change permalink. if we change permalink it is not working. only ways to change in .htaccess to hide the subfolder. please help me how to write the rule in in .htaccess.
Here’s what I did. I changed the permalink structure in the WordPress Dashboard under Settings>Permalink to domain.com/pagename. This breaks the pages temporarily. THEN I made an htc.access file under public_html and put this in it:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I think that should do it and the pages aren’t broken and have custom names.
inside the public_html directory already one index.php is there. so when i run http://domainname.com that is working with inside the public_html index.php. so that i have created and installed one subfolder with in the subfolder mywebsite is there. so when i run http://domainname.com/subfolder is working. i don’t want like this. i want when i run http://domainname.com/ it will run the index.php within the subfolder but dont want to show the subfolder url in webbrowser.
The above mentioned .htaccess file only on subfolder directory.