.htaccess

Replace URL segment hyphens with spaces using htaccess rewrite rules

杀马特。学长 韩版系。学妹 提交于 2021-02-11 06:19:44
问题 I have a friendly URL as follows: www.dominio.com.br/cidade/sao-paulo And here's my htaccess rewrite rule: RewriteRule ^cidade/(.*)$ busca-cidade.php?cidade=$1 And the SQL query: Select * from cidades where cidade = 'sao-paulo' Is it possible to replace the hyphens with spaces using htaccess and rewrite rules? So the friendly URL will be mapped to: www.dominio.com.br/busca-cidade.php?cidade=sao%20paulo This finished my code, was great, would give to optimize. #################################

500 error when trying to add expires header to .htaccess

随声附和 提交于 2021-02-11 02:10:22
问题 I'm trying to add a far future expires header by editing my .htaccess file this is recommended in the yslow performance rules but when I do, I get a 500 internal server error here's the code I'm using, any body know what's up? ExpiresActive On ExpiresDefault A0 ExpiresByType image/gif A2592000 ExpiresByType image/png A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType image/ico A2592000 ExpiresByType text/css A2592000 ExpiresByType text/javascript

500 error when trying to add expires header to .htaccess

回眸只為那壹抹淺笑 提交于 2021-02-11 01:57:43
问题 I'm trying to add a far future expires header by editing my .htaccess file this is recommended in the yslow performance rules but when I do, I get a 500 internal server error here's the code I'm using, any body know what's up? ExpiresActive On ExpiresDefault A0 ExpiresByType image/gif A2592000 ExpiresByType image/png A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType image/ico A2592000 ExpiresByType text/css A2592000 ExpiresByType text/javascript

500 error when trying to add expires header to .htaccess

我是研究僧i 提交于 2021-02-11 01:56:17
问题 I'm trying to add a far future expires header by editing my .htaccess file this is recommended in the yslow performance rules but when I do, I get a 500 internal server error here's the code I'm using, any body know what's up? ExpiresActive On ExpiresDefault A0 ExpiresByType image/gif A2592000 ExpiresByType image/png A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType image/ico A2592000 ExpiresByType text/css A2592000 ExpiresByType text/javascript

$_POST empty after form submit with htaccess redirect

馋奶兔 提交于 2021-02-10 23:52:48
问题 I'm experiencing a problem with an empty $_POST array after submitting a html form. <form action="interview/booking_summary" method="POST"> <p>Ihr Name: <input type="text" name="name" /></p> <p>Ihr Alter: <input type="text" name="alter" value="23" /></p> <p><input type="submit" name="submit" /></p> </form> I think it has to do with my .htaccess file. This seems to redirect pages (e.g. file.php will be shown as file (without .php suffix) Unfortunately I'm just working on a site I did not

$_POST empty after form submit with htaccess redirect

☆樱花仙子☆ 提交于 2021-02-10 23:51:32
问题 I'm experiencing a problem with an empty $_POST array after submitting a html form. <form action="interview/booking_summary" method="POST"> <p>Ihr Name: <input type="text" name="name" /></p> <p>Ihr Alter: <input type="text" name="alter" value="23" /></p> <p><input type="submit" name="submit" /></p> </form> I think it has to do with my .htaccess file. This seems to redirect pages (e.g. file.php will be shown as file (without .php suffix) Unfortunately I'm just working on a site I did not

$_POST empty after form submit with htaccess redirect

爷,独闯天下 提交于 2021-02-10 23:51:01
问题 I'm experiencing a problem with an empty $_POST array after submitting a html form. <form action="interview/booking_summary" method="POST"> <p>Ihr Name: <input type="text" name="name" /></p> <p>Ihr Alter: <input type="text" name="alter" value="23" /></p> <p><input type="submit" name="submit" /></p> </form> I think it has to do with my .htaccess file. This seems to redirect pages (e.g. file.php will be shown as file (without .php suffix) Unfortunately I'm just working on a site I did not

$_POST empty after form submit with htaccess redirect

≡放荡痞女 提交于 2021-02-10 23:49:29
问题 I'm experiencing a problem with an empty $_POST array after submitting a html form. <form action="interview/booking_summary" method="POST"> <p>Ihr Name: <input type="text" name="name" /></p> <p>Ihr Alter: <input type="text" name="alter" value="23" /></p> <p><input type="submit" name="submit" /></p> </form> I think it has to do with my .htaccess file. This seems to redirect pages (e.g. file.php will be shown as file (without .php suffix) Unfortunately I'm just working on a site I did not

htaccess redirect all images to handler

对着背影说爱祢 提交于 2021-02-10 22:31:02
问题 What I want to do is redirect all images (jpeg, png, gifs?) to a index.php?q=file and that handler will use a <img src=file> tag. But I'm afraid that when calling the file from that tag it will create an infinite loop. So basically what I'm asking is how to redirect only outside calls to an image. (Or is there a better way to protect my images?) 回答1: That rule creates a handler which takes all matching requests to imageHandler.php Please can you try the rule below; RewriteRule ^(.*)(.jpg|

htaccess redirect all images to handler

萝らか妹 提交于 2021-02-10 22:25:36
问题 What I want to do is redirect all images (jpeg, png, gifs?) to a index.php?q=file and that handler will use a <img src=file> tag. But I'm afraid that when calling the file from that tag it will create an infinite loop. So basically what I'm asking is how to redirect only outside calls to an image. (Or is there a better way to protect my images?) 回答1: That rule creates a handler which takes all matching requests to imageHandler.php Please can you try the rule below; RewriteRule ^(.*)(.jpg|