.htaccess

mod_rewrite: Rename filenames based on language

I have a bilingual website both in English and German. Both versions are served from the same root files like index.php, projects.php, people.php, etc. The English versions are called via http://myexample.com/en/index.php http://myexample.com/en/projects.php http://myexample.com/en/people.php The German versions are called via http://myexample.com/de/index.php http://myexample.com/de/projects.php http://myexample.com/de/people.php For SEO reasons I like the German filenames to be Germanized: de/projects.php -› projekte.php de/people.php -› leute.php Can…
Read more

Mis-configured domain, causing 104 (connection reset by peer) error on heroku website

I have a misconfigured heroku website. It shows error 104 (Read Error: Connection reset by peer) upon typing its URL and hitting enter. But subsequently refreshing the URL a couple of times makes the URL load correctly (some kind of fallback kicks in? – not that I knowingly configured any). The URL is http://damadam.in/ (it’s a naked domain). I bought…
Read more

Allowing Access to Only a Specific Path in .htaccess

I have the following in my .htaccess file: <Files *.php> Order Allow,Deny Deny from all </Files> <Files index.php> Order Allow,Deny Allow from all </Files> The above code is to restrict access to only the index.php file. However, the problem is that if there is another index.php file under a subdirectory, then that index.php file is allowed to get executed as…
Read more

removing url parameters from one url using .htaccess codes

I tried lot of combinations using available examples (.htaccess directives), but I couldn’t able to achieve what I want. The problem is… My actual URL is http://localhost/smon2/custsms/index.php?p_mob=9886419001 What I want is http://localhost/smon2/custsms/ Please help me in wrinting .htaccess code lines. Thanks Source: .htaccess

htaccess redirect to file except own IP

I’m having a bit of a trouble finding the right way to this: I’m about to launch a site, www.domain.com, but it’s not quite yet ready for the public eyes just yet. So I want to redirect all visitors (except myself) to www.domain.com/teaser.html. How can I do this, so I keep the site content hidden from visitors, without creating a…
Read more

enable CORS to allowed cross domain requests

This is driving me nuts. I have a wordpress instalaltion that uses WPML for translation. I have a extra domain for the second language that points to the root domain and loads the second language. Unfortunately I have a css problem. My console is giving me this error: Font from origin ‘http://www.example.com‘ has been blocked from loading by Cross-Origin Resource…
Read more