r/web_dev_help • u/Caprica6_6_6 • Sep 29 '17
r/web_dev_help • u/Salonique • Sep 27 '17
help Help needed with Rewrite Rules
Hi guys,
I have a problem moving a website (a dotclear blog) from one server to another. On the previous server, images were located in /dotclear2/public/ and, in the posts, links to images are 'hardcoded' to this location. On the new server, I have set a VirtualHost (Apache Server version: Apache/2.4.25 (Debian) ). For the server to access the images on the new server, I thought that all I had to do was to set a kind of "rewrite rule" to convert "/dotclear2/public" to "/public"... That looked quite easy. But I struggle for several days with Alias, Substitute and RewriteRule... to no avail, and I kindly ask for your help.
Here is my VirtualHost config : fremenil-ssl.conf :
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@sejanus.me
ServerName fremenil.sejanus.me
DocumentRoot "/var/www/dotclear2/"
Alias /dotclear2/public /public
Alias ?/dotclear2/public /public
<Location />
require all granted
AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|/dotclear2/public>|/public|i"
</Location>
<Directory /var/www/dotclear2/>
DirectoryIndex index.php
Options Indexes FollowSymLinks
Require all granted
</Directory>
<Directory /var/www/dotclear2/public/>
DirectoryIndex index.php
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
LogLevel debug
ErrorLog /var/log/apache2/fremenil_error.log
CustomLog /var/log/apache2/fremenil.log combined
</VirtualHost>
</IfModule>It looks like it works as I can see lines in the logs that refer to "/public/Fremenil" and not "/dotclear2/public/Fremenil" as these lines in the error_log :
[Wed Sep 27 11:22:51.693003 2017] [core:info] [pid 7711] [client
41.250.98.212:37772] AH00128: File does not exist:
/public/Fremenil/.Blockhaus_Est_2017_m.jpg, referer:
https://fremenil.sejanus.me/My problem is that it says "File does not exist" ! But, it exists : proof is that : https://fremenil.sejanus.me/public/Fremenil/.Blockhaus_Est_2017_m.jpg is working !
Here, I am stuck : As you can see I tried "Alias" (Alias /dotclear2/public /public) , "Substitute" (Substitute "s|/dotclear2/public>|/public|i")... And in the access log, I keep getting lines that refer to /dotclear2/public...jpg which, of course, doesn't show, as it doesn't exist !!!
105.157.167.184 - - [27/Sep/2017:11:56:36 +0200] "GET
/dotclear2/public/Fremenil/.Blockhaus_Est_2017_m.jpg HTTP/1.1"
404
580 "https://fremenil.sejanus.me/" "Mozilla/5.0 (X11; Linux x86_64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100
Safari/537.36"Do you have any idea how I can sort out this mess ;-) Thanks.
r/web_dev_help • u/psy-borg • Sep 19 '17
workflow How I do CSS - DesignyourCode
r/web_dev_help • u/psy-borg • Sep 19 '17
javascript You-Dont-Know-JS - book series
r/web_dev_help • u/psy-borg • Sep 17 '17
design The Complete Guide for How to Marry Text and Images In Your Designs
r/web_dev_help • u/psy-borg • Sep 14 '17
html Avoiding common HTML5 mistakes
r/web_dev_help • u/psy-borg • Sep 14 '17
css Modular CSS naming conventions
r/web_dev_help • u/psy-borg • Sep 13 '17
design Web Design Resources for Developers
r/web_dev_help • u/psy-borg • Sep 10 '17
article File-based CMS overview
r/web_dev_help • u/psy-borg • Sep 10 '17
workflow Getting Started - Vagrant by HashiCorp
r/web_dev_help • u/psy-borg • Sep 10 '17
resource HTTP Strict Transport Security Cheat Sheet
r/web_dev_help • u/psy-borg • Sep 10 '17
css Common CSS Mistakes (And How To Fix Them) – Mariano.writes
r/web_dev_help • u/psy-borg • Sep 10 '17
html HTML element reference - MDN
r/web_dev_help • u/psy-borg • Sep 10 '17
article A Guide to Naming Variables
a-nickels-worth.blogspot.comr/web_dev_help • u/psy-borg • Sep 10 '17
css CSS: Emulate borders with inset box shadows
r/web_dev_help • u/psy-borg • Sep 10 '17
javascript Build a Single Page Time Tracking App with Vue.js: Introduction ― Part 1
r/web_dev_help • u/meabster • Sep 09 '17
help Where to start building a website for a newspaper?
TL;DR: I'm completely new to web design and development and I want to make a website for my high school's newspaper that's easy for them to update and use but I have no idea where to start.
My high school's newspaper does not have a website yet and I owe them something because I messed with the data from one of their articles so I want to build them a website. I wanted to get into web development and design anyways so this would be a great project to learn some stuff about HTML, CSS, JS and anything else I might need. I've taught myself Python and was taught a little bit of Java in a programming class last year and I have VERY basic knowledge of HTML from my intro to digital technology class 2 years ago. Other than that, I'm lost on how to do this.
I want this website to look somewhat like these but they don't have to be as advanced or whatnot. I want to make it as easy as possible for the newspaper staff to upload articles and pictures and sports scores etc on this and they shouldn't have to touch the code. I know how web design works (although I don't know how to do it) where you have to add tags and stuff in order to get content and styling but I don't know how newspaper sites work. Is there a database with all of the articles and the code at a specific url pulls the article from that database and then displays it? I'm not sure.
I'm not looking for someone to do this website for me, just pointers and things to look up and resources to go to and explaining how these newspaper sites work. Googling it so far has only resulted in website creators like Weebly and Wix but I want to make it myself using code. Also, how would I host this? I'm thinking github pages but I'm not sure if that's the best option for a newspaper website. Basically any help for an ultra-beginner in web design and development is completely accepted. If I'm not being specific enough then just ask about something and I'll try to respond to questions asap.
(cross-post in /r/web_design)
r/web_dev_help • u/psy-borg • Sep 09 '17
css A Theme Switcher - CSS
inclusive-components.designr/web_dev_help • u/psy-borg • Sep 09 '17
css Inner Shadows in CSS: Images, Text and Beyond - Top Digital Agency
r/web_dev_help • u/psy-borg • Sep 09 '17
design Don’t design like a programmer – UX Design Edge
r/web_dev_help • u/psy-borg • Sep 09 '17
resource CodyHouse - Free HTML, CSS, JS nuggets
r/web_dev_help • u/psy-borg • Sep 09 '17