• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • The ImunifyAV extension is now deprecated and no longer available for installation.
    Existing ImunifyAV installations will continue operating for three months, and after that will automatically be replaced with the new Imunify extension. We recommend that you manually replace any existing ImunifyAV installations with Imunify at your earliest convenience.

Question Moving from cpanel to Plesk Obsidian problems with url rewriting

balistuart

New Pleskian
Server operating system version
Ubuntu 24.04
Plesk version and microupdate number
18.0.67 #2
Hi,
I’m in the process of moving a site from cpanel to Plesk Obsidian and am having problems with “friendly urls”

Site urls take the format:
www.example.com/shop/apples/bananas/pineapple

where shop is the actual PHP file and apples, bananas etc are like query string equivalents—the shop file grabs them and essentially handles as if querything variables etc

On cpanel, handled this with an entry like this in .htaccess:

<Files shop>
SetHandler application/x-httpd-ea-php82
</Files>
<Files shop2>
SetHandler application/x-httpd-ea-php82
</Files>
<Files shop3>
SetHandler application/x-httpd-ea-php82
</Files>

etcetera

So I’m trying to get Plesk to process specific extention-less file names (no .php) as php files, but for the life of me I can’t figure it out.

Any help, pointers to resources that explain how to do this, would be much appreciated.
Thanks!
 
<Files shop>
SetHandler application/x-httpd-ea-php82
</Files>
<Files shop2>
SetHandler application/x-httpd-ea-php82
</Files>
<Files shop3>
SetHandler application/x-httpd-ea-php82
</Files>
...etc...
Add these lines to your domain's Apache & nginx page

Log into Plesk > [Your Domain] > Hosting & DNS > Apache & nginx

Add above quoted text to Additional Apache directives in both HTTP & HTTPS boxes

Screenshot 2025-02-16 231412.png
Then remove those lines from the .htaccess file
 
Hi,
Thank you, but unfortunately that — and a bunch of other approaches — didn’t work.

In the end I gave up and instead rewrote the code of the various pages, renamed them with a .php suffix and then set up a series or rewrite rules that used the approach below to sent the request to the .php version of the file, and that worked.

RewriteRule ^shop/([^/]+)/?$ shop.php?apples=$1 [L,QSA]

Was, ahhhhh, a bit more work than I had planned on, but sorted it out in the end!
Cheers
 
Back
Top