I wanted to set up custom rewrite rules in my htaccess file as I have installed wordpress. I followed this article to the dot https://www.digitalocean.com/community/articles/how-to-set-up-mod_rewrite
I opened my htaccess file, edited it and tried to save it. I am informed that No such file or directory exists. I have no clue to sort it out.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I did the following steps <br> <br>******************** <br>Alternatively you can use this command, replacing the example.com with the name of your site, to create your .htaccess file in terminal. <br>sudo nano /var/www/example.com/.htaccess <br> <br>How to permit changes in the .htaccess file: <br>To allow the .htaccess file to override standard website configs, start by opening up the configuration file. NB: You will need sudo privileges for this step. <br> <br>sudo nano /etc/apache2/sites-available/default <br> <br>Once inside that file, find the following section, and change the line that says AllowOverride from None to All. The section should now look like this: <br> <Directory /var/www/> <br> Options Indexes FollowSymLinks MultiViews <br> AllowOverride All <br> Order allow,deny <br> allow from all <br> </Directory> <br> <br>After you save and exit that file, restart apache. .htacess files will now be available for all of your sites. <br> <br>sudo service apache2 restart <br> <br> <br>then <br> <br>sudo nano /var/www/udprakash.com/.htaccess <br> <br>********************************* <br> <br>edited it and tried to save it and that is when the problem occurred
Does <code>/var/www/udprakash.com</code> exist? If yes, you can simply ignore that error and save the file.
What command are you using to edit the file? Make sure the path exists.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.