1

I'm using wordpress for a site,

this url before tes.com/index.php/about/ i want url like this tes.com/about/

I have tried copying parts of WordPress' .htaccess, however shows a 404 error.

My .htaccess file looks like:

# 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

Any ideas on where to start and how to accomplish what I'm looking for?

Afrgun
  • 313
  • 3
  • 16
  • Usually for Wordpress, [this](https://wordpress.org/plugins/custom-permalinks/) plugin would do. Have you tried it? – Sina Oct 02 '15 at 05:53

3 Answers3

2

Go to your WP-ADMIN-->Settings-->Permalink and use the permalink structure change there, if it generate any .htaccess file copy the content and update your .htaccess file.

Or Check if your hosting mod_rewrite is enable by creating a file phpinfo.php with content,

Upload this file and browse via Browser. So you know which modules are enabled. You need mod_rewrite enable to remove index.php from URL.

kaleem
  • 572
  • 6
  • 11
0

Try this -

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /test.com/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /test.com/index.php [L]
</IfModule>
Kundan Sharma
  • 189
  • 1
  • 8
0

The official instructions will give you clean urls. So best to follow this

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
rottitime
  • 1,653
  • 17
  • 29