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 6823467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:47:10+00:00 2026-05-26T21:47:10+00:00

Why does mywebsite.com/page work, but mywebsite.com/page/ does not? We have an htaccess entry that

  • 0

Why does mywebsite.com/page work, but mywebsite.com/page/ does not? We have an htaccess entry that removes the .php ending of files, for example “mywebsite.com/new.php” can be accessed simply as “mywebsite.com/new”. However, if a forward slash is added (and this seems to happen with some search engines adding it or browsers for some reason) then our 404 error page is shown. Any ideas? Many thanks!

Here are all the rewriterules in the .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z0-9\-_]+)/?$ $1.php [NC,L]

rewriteCond %{HTTP_HOST} ^mywebsite.cz [NC]
rewriteRule ^(.*)$ http://www.mywebsite.cz/$1 [R=301,L]

rewriteCond %{HTTP_HOST} ^mywebsite.com [NC]
rewriteRule ^(.*)$ http://www.mywebsite.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^mywebsite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mywebsite.com$
RewriteRule ^cs$ "http\:\/\/www\.mywebsite\.com\/index_cz\.php" [R=301,L]

RewriteCond %{HTTP_HOST} ([^.]+)\.mywebsite.com [NC]
RewriteCond %{HTTP:Accept-Language} (cs) [NC]
RewriteRule ^$ http://www.mywebsite.cz [L,R=301]

RewriteCond %{HTTP_HOST} ([^.]+)\.mywebsite.cz [NC]
RewriteCond %{HTTP:Accept-Language} (cs) [NC]
RewriteRule ^$ /index_cz [L,R=301]

RewriteCond %{HTTP_HOST} ^www.mywebsite\.com
RewriteRule ^([0-9]+)/?$ project.php?id=$1 [NC,L] # Handle project requests

RewriteCond %{HTTP_HOST} ^www.mywebsite\.cz
RewriteRule ^([0-9]+)/?$ project_cz.php?id=$1 [NC,L] # Handle project requests
  • 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-05-26T21:47:10+00:00Added an answer on May 26, 2026 at 9:47 pm

    You can try this:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([a-z0-9\-_]+)/?$ $1.php [NC,L]
    

    also, you have to change all your , , to point to the root of the folder. eg:

    <link rel="Shortcut Icon" type="image/ico" href="favicon.ico"/>
    <script type="text/javascript" src="js/charactercounter.js"></script>
    

    will become:

    <link rel="Shortcut Icon" type="image/ico" href="/favicon.ico"/>
    <script type="text/javascript" src="/js/charactercounter.js"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

1- Does mod_rewrite means that if I make this url: domain.com/ad.php?id=8498292 INTO domain.com/8498292 that
On my website, I have a search.php page that makes $.get requests to pages
mywebsite.com/123 should display content via .htaccess of mywebsite.com/project.php?id=123 - unfortunately I changed the .htaccess
Does anyone have any recommendations of tools that can be of assistance with moving
Does anyone use have a good regex library that they like to use? Most
I added the following .htaccess rule:- RewriteRule ^widgets$ products.php?cat=20 [QSA] So now I have
I have a website that has an index.php, a few simple .html pages and
Suppose the user try to access the following web page on my website http://something.com/hello/hi.php
i have an asp.net mvc website. http:/mywebsite.com (just for this example) I have been
I have done much research into the issue, I'm not blindly asking but 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.