Enabling Temporary Links and .htaccess Rewrite Rules

VisHype

Registered
Apr 22, 2018
1
0
1
Shropshire
cPanel Access Level
Website Owner
Good afternoon everyone,

I have just purchased a VPS as I am a Freelance Website Developer and plan to grow in the next year or so; hence the upgrade as I need stability.

I use a bespoke PHP content management system which uses several Rewrite Rules via .htaccess and since migration I cannot get the websites to work properly due to the Rewrite Rules not functioning.

I had problems with the temporary URLs too but have finally got them working by using OpenLiteSpeed and by changing a few other things.

If anyone can give me some advice on how I can get this .htaccess file working as it should, I would be very appreciative. I've spent the entire day researching and I'm no better off!

Kind Regards,
Dan
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello,

Are you referring to the Apache Mod_Userdir temporary URLs (e.g. IP/~username)? If so, it's important to note that websites using Mod_Rewrite or other directives in their .htaccess files will not function correctly when visitors view them through mod_userdir URLs. If you'd like to test out the rules before the domain name propagates, you should instead modify the hosts file on your own computer, per the instructions we document at:

How to Modify your hosts File - cPanel Knowledge Base - cPanel Documentation

Thank you.