• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

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