cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
Skilled II

Is there a way to use regular expressions in .htaccess file

I migrated my website built with Adobe Muse to a Web Builder site. I published the Web Builder site on a new domain to allow me to redirect the .html pages from the old site to the new site. This convoluted work around was required since Web Builder sites do not have a facility for creating redirection records.

 

The cPanel Redirect tool does not seem to allow for the inclusion of regular expressions. However it does have a column to display regular expressions.

 

If I download the .htaccess file with cPanel File Manager, edit it manually to add the desired regular expressions, and upload it, will subsequent cPanel redirection edits over write my manual edits? I understand that deleting a record with regular expressions and recreating it in the cPanel redirection tool will overwrite the original record. I am more concerned with overwriting a record with regular expressions when adding or deleting an unrelated redirection entry.

 

I guess what I am really asking is whether edits in the cPanel redirection tool are line item changes to the .htaccess file or is the entire file overwritten whenever updates are made from within the cPanel utility? 


Website + Marketing User since 2-Dec-2019
Reverse Logic Limited
1 ACCEPTED SOLUTION
Resolver VI

Hi 

  1. From your Cpanel file manager, go to the root folder of your website (ie. public_html).
  2. Check that the .htaccess file does not exist. If exists, skip to step 4.
  3. Create the .htaccess file, by clicking on the top left menu
  4. Right-click on the file and edit.

 

Zulfiqar Anees | Founder/CEO at FastTech Media, TechMag, TechKnowable, and ZulWeb | GoDaddy Pro.

View solution in original post

1 REPLY 1
Resolver VI

Hi 

  1. From your Cpanel file manager, go to the root folder of your website (ie. public_html).
  2. Check that the .htaccess file does not exist. If exists, skip to step 4.
  3. Create the .htaccess file, by clicking on the top left menu
  4. Right-click on the file and edit.

 

Zulfiqar Anees | Founder/CEO at FastTech Media, TechMag, TechKnowable, and ZulWeb | GoDaddy Pro.

View solution in original post