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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:53:46+00:00 2026-05-24T03:53:46+00:00

OK, so we have a specific set of rewrites that we use on a

  • 0

OK, so we have a specific set of rewrites that we use on a number of sites due the file structure of our programming. It’s never been a problem before until now.

For example, the rewrite:

RewriteRule ^$ Pages/news.php 

Instead of directing to http://www.domain.com/wedding-venues-and-caterers-news/Pages/news.php it is redirecting to /path/to/file/public/wedding-venues-and-caterers-news/Pages/news.php and it’s 404-ing (/path/to/file being the actual path).

If anyone could shed any light as to why this is happening, or point me in the right direction then I would be eternally grateful.

I am running all of my script and files in a subfolder, there is another .htaccess file in the root folder which I have edited in at the bottom but it doesn’t seem to contain anything that could be interfering.

If you require any further information on the server then let me know!


EDIT – Here are all my rewrites as requested.

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteRule ^$ Pages/news.php  
RewriteRule ^images/([0-9]+)/([0-9]+)/(0|1)/(.*).jpg?$ Classes/Image/timthumb.php?src=http://www.domain.com/wedding-venues-and-caterers-news/images/$4.jpg&h=$1&w=$2&zc=$3
RewriteRule ^([A-Za-z0-9\-]+)/([0-9]+)/([0-9]+)(/)?$ Pages/archives.php?cat_id=$2&page=$3 [NC,L]
RewriteRule ^archives/mon/([0-9]+)/yr/([0-9]+)/([0-9]+)$ Pages/archives.php?mon=$1&yr=$2&page=$3 [NC,L]
RewriteRule ^([A-Za-z0-9\-]+)/([0-9]+)(/)?$ Pages/archives.php?cat_id=$2 [NC,L] 
RewriteRule ^archives/mon/([0-9]+)/yr/([0-9]+)(/)?$ Pages/archives.php?mon=$1&yr=$2 [NC,L]
RewriteRule ^([A-Za-z0-9\-]+)/([A-Za-z0-9\-]+)/([0-9]+)(/)?$ Pages/article.php?art_id=$3 [NC,L]
RewriteRule ^wedding-venues-catering-rss(/)?$ rss/rss.php [NC,L]
RewriteRule ^Page-Error(/)?$ Pages/errorPage.php [NC,L]
ErrorDocument 404 http://www.domain.com/wedding-venues-and-caterers-news/Page-Error
ErrorDocument 401 http://www.domain.com/wedding-venues-and-caterers-news/Page-Error
ErrorDocument 403 http://www.domain.com/wedding-venues-and-caterers-news/Page-Error
ErrorDocument 404 http://www.domain.com/wedding-venues-and-caterers-news/Page-Error
ErrorDocument 500 http://www.domain.com/wedding-venues-and-caterers-news/Page-Error

I also tried to reference the rewrites with absolute URL’s, this worked of course, but they were just redirecting instead of rewriting as you might expect.


EDIT – This is the other .htaccess file in the root directory, which is part of their existing site.

#Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] 

<IfModule mod_rewrite.c>
RewriteEngine on
redirect 301 /Cavendish.htm http://www.domain.com/
redirect 301 /grange.htm http://www.domain.com/
redirect 301 /restaurant/index.html http://www.domain.com/
redirect 301 /news/Save-money-by-booking-wedding-venues-in-Middlesex-at-off-peak-times.asp http://www.domain.com/
redirect 301 /news/default.asp http://www.domain.com/


EDIT – I thought this might be relevant.

The 404 error on the rewrite shows this path –

 /l/i/domain.com/public/wedding-venues-and-caterers-news/Pages/news.php

But.. if I edit news.php and request SCRIPT_FILENAME it gives me the path..

 /services/webpages/l/i/domain.com/public/wedding-venues-and-caterers-news/Pages/news.php

My guess is that something is affecting the default path.

Furthermore I have tried basic rewrites at root level, but these also 404.

  • 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-24T03:53:46+00:00Added an answer on May 24, 2026 at 3:53 am

    Finally the issue has been solved.

    As the server is hosted with BT Business I decided to email them to see if they could help.

    A guy replied saying he had logged in to the server and modified the .htaccess and it now works fine.

    He simply added the subfolder in front of the rewritten URL’s.

    IE:-

    RewriteRule ^$ Pages/news.php  
    

    Became: –

    RewriteRule ^$ wedding-venues-and-caterers-news/Pages/news.php
    

    I am still unsure why the subdirectory is needed when the .htaccess file is inside that directory, my guess is it is something to do with their server settings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to set AlarmManager for Specific date, but it is not
I'm new to c++ but have set my mind on a specific task that
I have a template method that is designed to work with a specific set
I've got a web browser control that needs to have a specific height set.
Here's my scenario: I have a simple stored procedure that removes a specific set
I want to update multiple rows that have specific count number (count(*)=2) with number
I have a very specific set of needs and am looking for a library
I have a data frame where one particular column has a set of specific
I have a set of transactions occurring at specific points in time: CREATE TABLE
Basically I have my Emacs set up so it has a GUI specific elisp,

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.