1

I have Wordpress installed in the root directory and configured properly using permalinks.

Alongside the Wordpress blog, I have a full-fledged custom developed php application with several pages. I want to not show the .php extension for any of the custom pages, but I'm now getting 404 errors for all the custom php pages.

http://url/blog-title-here (word press page - works)

http://url/register (custom php page - results in 404)

Here's what my .htaccess 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>

And here's what I have in httpd.conf

<Directory />
Options FollowSymLinks
AllowOverride All
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) $1.php [L]
</Directory>
timw07
  • 21
  • 2

1 Answers1

0

Method 1:

https://stackoverflow.com/questions/4026021/remove-php-extension-with-htaccess

Method 2:

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /

# each script write like this
RewriteRule ^register$ register.php [QSA,L]

RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L] 
</IfModule>
Jstars
  • 11
  • 3