Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8935999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:06:59+00:00 2026-06-15T10:06:59+00:00

I know these rewrite rules questions are all over StackOverflow – and I’ve read

  • 0

I know these rewrite rules questions are all over StackOverflow – and I’ve read all of them. I’ve tested my htaccess code on http://htaccess.madewithlove.be/ and it comes back as working.
But on my site it doesn’t work.

Here’s the code(currently on the site under the /new/ folder):

Options +FollowSymLinks

RewriteEngine On 
RewriteBase /new


RewriteCond %{REQUEST_URI} !\.php$ [NC]
RewriteCond %{REQUEST_URI} [^/]$
RewriteRule ^(.*)$ $1.php

Here’s the site:
http://strattonindustrial.com/new/property/page

I want the /page/ to redirect to /page.php in the background, but show the /page/ in the URL, but it gives me a 404 page, so no redirecting is happening. I’m basically trying to remove the “.php” from the file name and make it SEO friendly.

Additionally, I’ve called Godaddy and checked to make sure mod_rewrite is loaded and turned on. They can’t find anything on their end that isn’t working.
So it must be something with my code, but FOR THE LIFE OF ME I can’t figure it out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:07:00+00:00Added an answer on June 15, 2026 at 10:07 am

    Here is the code that you need:

    RewriteEngine On
    RewriteOptions inherit
    Options +FollowSymlinks
    
    RewriteBase /new
    
    ## hide .php extension
    # To externally redirect /dir/foo.php to /dir/foo
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
    RewriteRule ^ %1 [R,L,NC]
    
    ## To internally forward /dir/foo to /dir/foo.php
    RewriteCond %{REQUEST_FILENAME}.php -f
    RewriteRule ^ %{REQUEST_FILENAME}.php [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anybody know how to get all of these in a C# app that leads
What I'm trying to accomplish with htaccess mod-rewrite: Redirect all sub-domains to new domain
I have seen many times in htaccess these type of rules : RewriteCond %{HTTP_REFERER}
I know that too much questions exist for htaccess redirection, but I couldn't find
My client has PHP running on an IIS server, I know these vti_conf files
anyone know if these are available?
Does anyone know what these error's mean? I get this when I click a
I'm testing performance of Node.js with MongoDB. I know each of these is fine
which library would you advise me to use? I don't know any of these
I know there is a lot of talk about BPM these days and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.