• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

.htaccess not working since update to Dreamweaver CC

Community Beginner ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Hi,

I had a website created in Dreamweaver CS6 (PHP 5.6) and created friendly URLs using htaccess which worked fine. I have since updated everything using Dreamweaver CC to PHP 7.3 but now the htaccess file has stopped working. I have been in touch with my hosting provider Fasthosts and while dropping the extensions is working in my htaccess file works fine, its not reading the friendly URL's.

Fasthost has asked me to check the scripting path of my website as it seems that the file does not recognise the path of my files for my pages.

What do I need to do to get it to recognise them?

Thanks for all your help!!!!

Views

591

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , May 15, 2019 May 15, 2019

Hi everyone, and thank you for your help, you have been great trying to sort this out for me. I have just received a notification from Fasthosts informing me that its not working due to their servers and that I need to use a cloud or dedicated server for this to happen.

Cheers

Votes

Translate

Translate
Community Expert ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

We can discount the Dreamweaver effect because there is no functional difference between versions CS6 and CC.

That leaves us with the difference between PHP 5.6 and PHP 7.3. Not knowing what you have coded in PHP, I am assuming that you have used database connections to retrieve the paths for your pages. I am also assuming that you have used MySQL queries to obtain that information. The sad part is that PHP 7 does not recognise MySQL; but needs MySQLi (improved) or PDO queries to retrieve the information. See PHP 7 Connect to MySQL for more.

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Hi,

Thanks for this, the information is being brought back correctly and is working fine on the MySQL database, as the full length URL with all of the params. Its getting this long URL to shorten with htaccess that is the problem.

http://1100962072.test.prositehosting.co.uk/content.php?Page_URL=about-us

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Where have you placed the .htaccess file? I ask this because you show

<base href="/"/>

which is not the root directory of your test site.

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Hi,

Yeah sorry I was messing around with that as it was suggested by someone else. I've checked in my erros logs and I get this message:

forbidden by Options directive, referer: http://1100962072.test.prositehosting.co.uk/content.php?Page_URL=about-us

Any ideas?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Post contents of your htaccess please

Paul-M - Community Expert

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^([^\.]+)$ $1.php [NC]

RewriteEngine On

RewriteRule ^([a-zA-Z0-9_-]+)$ content.php?Page_URL=$1

RewriteRule ^([a-zA-Z0-9_-]+)/$ content.php?Page_URL=$1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

I think that you are looking for the cause of the problem at the wrong end.

When I go to The Official Visit County Durham Website | Destination Management Organisation for Durham and click on the About Us, I get taken to http://1100962072.test.prositehosting.co.uk/about-us​. Pity the file cannot be found.

In other words, make sure that the called file is in the correct spot in your site structure.

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Hi,

Once you are on that page and click on About Us it isn't not going to bring anything back as all of the links are based around the params of content.php there is no about-us.php

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Works here:

The Official Visit County Durham Website

Obviously that crap url, whatever that is, is the problem:

The Official Visit County Durham Website | Destination Management Organisation for Durham

Not sure why you would be using that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

The first link you posted was the live site where it work fine. Written in PHP5.6 on a different server.

It's an issue with the server running PHP 7.3 I just need to change servers and it will be fine, but thanks for your input.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

LATEST

Lisa2706  wrote

The first link you posted was the live site where it work fine. Written in PHP5.6 on a different server.

It's an issue with the server running PHP 7.3 I just need to change servers and it will be fine, but thanks for your input.

Given the 'testing' url I thought it might be fairly obvious that could be the source of the issue and when the files were transferred to the 'correct' dedicated server the issue would resolve itself.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Hi everyone, and thank you for your help, you have been great trying to sort this out for me. I have just received a notification from Fasthosts informing me that its not working due to their servers and that I need to use a cloud or dedicated server for this to happen.

Cheers

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines