mod-rewrite Questions

9

Solved

I have a URL http://localhost/index.php?user=1. When I add this .htaccess file Options +FollowSymLinks RewriteEngine On RewriteRule ^user/(.*)$ ./index.php?user=$1 I will be now allowed to use...
Maxilliped asked 1/8, 2014 at 12:58

3

Solved

How can i use RewriteMap directive in htaccess file? When i put it there i get "RewriteMap not allowed here" error. I know this error will disappear when put it in httpd.conf or virtualhost config...
Biodegradable asked 20/10, 2010 at 7:29

2

Solved

This is essentially the same question as htaccess force https and redirect www to non-www, but no other subdomains (i.e., I want to configure Apache to redirect all non-HTTPS and/or "www" URLs to H...
Piapiacenza asked 3/9, 2016 at 5:57

7

Solved

Bellow is my site directory structure: htdocs/ My-Project/ public/ index.php css/ img/ js/ src/ config.php templates/ library/ I do not want any direct user access to any files inside...
Graehme asked 13/5, 2014 at 15:40

5

Solved

I have updated Apache today (to 2.4.56-1) and a load of .htaccess rewrites that used to work are now getting AH10411 errors, relating to spaces in the query. I'm struggling for a 'proper' solution....
Oppenheimer asked 9/3, 2023 at 12:0

13

Solved

I'm having small troubles and was wondering if someone can help me over the hump. I pulled a copy of a website down from Hostgator and I'm trying to set it up on my local machine using WAMP but, I ...
Lurk asked 17/9, 2013 at 14:49

14

Solved

Point #1 If I type: www.myurl.com/somepage http://www.myurl.com/somepage http://myurl.com/somepage https://myurl.com/somepage have it redirect to https://www.myurl.com/somepage Point #2 When...
Phonate asked 4/1, 2016 at 7:12

2

Solved

I'm wondering whether I can use RewriteEngine On only once within my htaccess when it is embed in IfModule mod_rewrite.c or do I have to use it every time because it is embeded? See example below....
Flirt asked 14/7, 2013 at 3:56

3

Solved

all I need is to get a string as URL without showing the PHP filename. I have file contact.php page I am trying to get URL as e.g. localhost/contact.php this is what now I am getting I need ...
Tripp asked 21/8, 2015 at 12:8

3

Solved

I have this structure: site.com/api/index.php. When I send data to site.com/api/ there is no issue, but I imagine it would be better if the api would work without the trailing slash also, like this...
Sciomachy asked 4/9, 2013 at 23:27

6

Solved

I have a URL that looks like: url.com/picture.php?id=51 How would I go about converting that URL to: picture.php/Some-text-goes-here/51 I think WordPress does the same. How do I go about mak...
Sideband asked 5/5, 2013 at 20:43

0

Is it possible to redirect any URLs other than example.com (e.g. example.com/assets/, example.com/made-up-filename.ext, example.com/includes/, example.com/a/random/made/up/path/, etc), whether or n...
Roccoroch asked 25/1, 2024 at 11:26

3

Solved

Is it possible to block POST method on some url like www.mydomain.com/dontposthere www.mydomain.com/something/againdontposthere in htaccess ?
Americano asked 14/6, 2013 at 17:47

5

I have an issue using mod_rewrite to force redirection of HTTP requests to HTTPS using Apache 2.2.22 on Ubuntu Server 12.04. My /etc/apache2/sites-available/default file is as follows: <Virtu...
Juryman asked 25/7, 2013 at 9:16

6

I want www.example.com/about.php to just be www.example.com/about I created an .htaccess file and placed it in the root of my server. I am using linux shared hosting. PHP version 5.2 RewriteEngin...
Pearly asked 5/5, 2012 at 14:30

5

Solved

I'm looking for a way to remove trailing slash for all WordPress URL's. I found similar answers like this one but it doesn't work when there's WordPress .htaccess rules before. Here is my current...
Ssm asked 19/12, 2011 at 7:20

3

Solved

My Wordpress directory is at www.example.com/blog I recently changed my entire site to force HTTPS. So my .htaccess file in /blog/ looks like this: <IfModule mod_rewrite.c> RewriteEngine On...
Radtke asked 3/10, 2013 at 20:17

18

Solved

Yes, I've read the Apache manual and searched here. For some reason I simply cannot get this to work. The closest I've come is having it remove the extension, but it points back to the root directo...
Gelasias asked 26/10, 2010 at 17:1

2

Solved

After apache update, my server started dropping this error in URL queries, containing spaces: AH10411: Rewritten query string contains control characters or spaces URL looks as follows: www.examp...
Kalvin asked 4/4, 2023 at 10:33

8

Solved

I have a index.php which handle all the routing index.php?page=controller (simplified) just to split up the logic with the view. Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_FILE...
Manifestation asked 6/10, 2011 at 15:58

2

Solved

I have a website at example.com/test/. Lets say the website is laid out as such: example.com └── test/    ├── assets/ │ └─ stylesheet.css │ ├── .htaccess └── index.php index.php here is the...
Oxytetracycline asked 20/8, 2012 at 1:32

5

Solved

I host a JavaScript game which basically consists of an .html and a .data file. If I compress them with gzip, their size shrinks to 25%. So I want to do that. I'm not 100% sure, but I think using ...
Undermanned asked 2/6, 2013 at 13:32

2

Solved

I am running a LAMP stack in docker with the help from docker-compose, and for the webserver I am using the official image from https://hub.docker.com/_/httpd. The httpd container is created by a D...
Satirical asked 8/3, 2020 at 20:43

6

Solved

I'm revealing my embarrassing ignorance of REGEX-fu here, but: I currently have a website where a load of the articles' URLs are written as "article_name", whilst the newer ones are written as "art...
Murtagh asked 14/8, 2009 at 19:17

6

Solved

I have installed rewrite_module and modified php.ini on Apache. I create rewrite.php and .htaccess files, but it's not working. My filesystem folders like: /var/www/html /var/www/html/test /var/...
Niobe asked 19/10, 2011 at 4:8

© 2022 - 2025 — McMap. All rights reserved.