0
votes
1answer
14 views

Display contents of domain folder on sub domain root

I have a website at root of main domain, let's call it domain(dot)com, this site runs a template based system through htaccess, similar to wordpress. On there i have a section called ...
0
votes
1answer
12 views

How to exclude a RewriteRule?

I have the following RewritRule in my .htaccess what causes a problem for further actions: RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] Now I would like ...
0
votes
0answers
18 views

htaccess forward one url differently

Good morning, I am learning my way around the MVC framework. One of those aspects is the htaccess file, to clean up that URL. Now, I've finally come up with the htaccess you see below, but need to ...
1
vote
2answers
59 views

How to put php GET params in a HTML file?

I have a PHP file which returns me a JSON array based on the GET parameters set. I don't want to reload the page so I made a simple function using jQuery + AJAX to show the result in a div tag. But ...
-2
votes
0answers
14 views

want to disable htaccess from updating the default php values set in php.ini [closed]

In my development server PHP is installed as Apache module. Some developers are changing php values for some projects by putting like "php_value memory_limit 512M" in htaccess file. I want to ...
0
votes
0answers
39 views

how to set “ShibRequireSession” on or off for a URL in htaccess

I want some thing like this, when a user visits a url www.example.com no rules is applied on it but, when user visits www.example.com/something else rules should be like, ...
1
vote
0answers
48 views

MVC Internal Server Error

I'm trying to build an PHP MVC. I currently watching this tutorial link But from the start its not working. I'm running it in WAMP It gives me this error: Internal Server Error The server ...
0
votes
0answers
24 views

.htaccess 301 redirection removing white space [duplicate]

My site link is containing name with lots of white space in parameter. file.php?dir=Songs/Bollywood%20Mp3/I%20Dont%20Luv%20U-2013 file.php?dir=Songs/Bollywood%20Mp3/Go%20Goa%20Gone-2013 ...
2
votes
1answer
38 views

URL Rewrite Regular Expression to suit all

Brief Explanation I am trying to come up with a smart way of controlling my web page rewrites with as few rewrites as possible. So, for example, if you have the following page translations: ...
0
votes
1answer
13 views

How do you set a custom environment variable (htaccess) based on device?

How would you perform a simple mobile browser check and store the resulting boolean in an environment variable in .htaccess so that PHP can do a simple DEFINE('ISMOBILE',(env check ? true : false)); ...
-5
votes
1answer
40 views

enabling .htaccess but leave index.php to show [closed]

Is there a possibility to enable .htaccess (renaming htaccess.txt to .htaccess) but leave index.php to continue showing in url ? Appreciate every help. Ok, but this is original htaccess file as it ...
0
votes
2answers
60 views

Resource interpreted as Stylesheet but transferred with MIME type text/html with css generated in PHP

i have a site where the css is not interpreted. I've seen other answers but not one for a dinamically generated css. I'm generating the CSS in PHP by adding <link media="all" type="text/css" ...
2
votes
1answer
28 views

Htaccess : making Fake folder to get accessible/

I have created folder http://domain.com/sport/ What i need is whenever i access http://domain.com/sport/anything/anything/ , it needs to show contents of http://domain.com/sport/index.php Right ...
0
votes
2answers
37 views

Redirecting everything to index.php and stripping last slash

i currently have the code below to redirect all requests (except files) to the index.php unfortunately i cannot get my script to work because of some strange mime type error happening when my url ends ...
-1
votes
0answers
21 views

.Htacess page is not woking in (go-daddy linux) [closed]

htacess page for .php extensions, Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / ## hide .php extension # To externally redirect /dir/foo.php to /dir/foo ...
0
votes
1answer
31 views

Redirect to public folder when using ZF2

I'm using ZF2 (Zend Framework 2, v2.2) and I would like that http://www.foo.com/path/to/app/ redirect to the public folder. I've tried a lot of solution but not of them allow the url to point to ...
-2
votes
1answer
12 views

Dynamic url re-writing using htaccess

How can I rewrite http://mydomain.com/test/master.php?catid=2&subcatid=8 to http://mydomain.com/test/master.php/catname/subcat using a .htaccess file. Once rewritten, how can I access these ...
1
vote
0answers
41 views

Unreachable website

I have problems with my website being ureachable every few minutes. It usually happens when I try to upload some photos and site just becomes unreachable. But if I try with proxy it works fine at the ...
0
votes
4answers
34 views

mod_rewrite domain to directory

I want rewrite example.com url to example.com/ru For example if url is example.com/books I want have example.com/ru/books I think I can't this do with header() function This method is also ...
0
votes
1answer
18 views

Trouble with vanilla Bonfire/CI installation and .htaccess

OK, so my situation is rather simple (although not yet resolved). I downloaded Bonfire (for CodeIgniter) Created a new folder in my Sites folder, let's say bonfire (I'm using XAMPP for Mac) I'm ...
0
votes
3answers
23 views

handle error pages using PHP and htaccess

I want put some codes like below in my htaccess file: ErrorDocument 403 /error/403 ErrorDocument 404 /error/404 ErrorDocument 500 /error/500 ... and have a PHP file which handles the error pages ...
0
votes
0answers
31 views

Secure streaming link

I have a problem to secure and protect my video link from direct downloads... I am try to make something like this link http://server1.site.com/videos/123/456/789.mp4?key=0457043013fbd9ebae8ae3 ...
0
votes
1answer
23 views

CakePHP in sub-url (not sub-directory)

I can find dozens of articles on installing CakePHP in a sub-directory and getting it to appear in the root url. That is NOT what I am asking for. I rarely down-vote, but if you give that answer, I ...
0
votes
1answer
36 views

Enabling GZIP compression for php script

I've enabled gzip on my php scripts by doing this: <? ob_start("ob_gzhandler"); ?> <?php header('Content-Type: application/json'); header('Accept-Encoding: gzip'); /* Request data, ...
1
vote
1answer
41 views

htaccess show shorten url

I am using .htaccess to shorten a long url to a shorter nice looking url like www.dom.com/trol to http://www.newdom.com/blog.php?type=user&user=trol It works fine. But it the browser it shows ...
0
votes
1answer
36 views

url rewritting using .htaccess

I am using codeigniter.There is a url patern: localhost/mysite/application/assets/projects/projectname The projectname part is dynamic. Now I want to rewrite that url to: ...
0
votes
1answer
37 views

Getting a file to download instead of opening the browser

I have a site built with php, there are .kml files that I would like the user to be able to download when they click on the link, but it current opens the (xml-like) file in the browser. I have tried ...
0
votes
1answer
21 views

Using two GET variables in .htaccess (having problems outputting)

I'm currently trying to add a second get variable to an existing htaccess rule. I have little experience with the htaccess but using what expressions I know, I think it's missing one element to ensure ...
1
vote
0answers
59 views

Wordpress 403 Forbidden “You don't have permission to access / on this server.”

I can't access any pages/login to my wordpress based website. I get this message : Forbidden You don't have permission to access / on this server. after some research on stackoverflow and other ...
0
votes
0answers
21 views

.htaccess redirect on both domain and /~user/

I've got a problem with rewriting urls when using a domain and x.x.x.x/~user Both these should redirect to the users index.php and then I handle which page the visitor wishes to see by checking the ...
-2
votes
3answers
49 views

How to Hide .php Extension from webpages [duplicate]

I am new in php web development, I am trying this codes to hide .php extension from My website URL, through .htaccess file but it can't work and showing "Server Error" <IfModule mod_rewrite.c> ...
1
vote
3answers
47 views

How to rewriting URL with HTACCESS [duplicate]

This is a line of code on my htaccess file RewriteRule ^([^\.]+)$ details.php And this is working fine with this URL example.com/shiv-sales-corporation Now i want to add .html at the end of URL ...
1
vote
1answer
31 views

Apache vhost rewrite goes wrong with existing folders

I want my vhost to rewrite urls such as: http://dev.example.com/cool/story/bro To: http://dev.example.com/index.php?url=cool/story/bro Unless specifying an existing file such as: ...
3
votes
1answer
29 views

Rewrite dynamic urls

I have a user.php file that contains code for different pages - account, data and home. They are currently accessed through a dynamic url with GET parameters like so: ...
0
votes
2answers
39 views

Remove file extention from urls

I have some urls in my website like this.. http://www.mydomain.com/about.php http://www.mydomain.com/contact.php http://www.mydomain.com/signup.php http://www.mydomain.com/testimonials.php ...... and ...
1
vote
2answers
42 views

.htaccess rewrite / to index.html, all other to index.php

I want to use .htaccess to rewrite url to my webite: If url is http://mydomain.com or http://mydomain.com/ the index.html will serve the request, all other urls will go to index.php please help!
0
votes
1answer
20 views

Godaddy Ubuntu 3.6 mod_rewrite issues

I have been at this for 3 hours and cannot seem to get mod_rewrite to work with GoDaddy on a shared server under a subdomain. I have an app in a subdirectory and I've used the same rules before on ...
-2
votes
1answer
32 views

redirect to different URL with .htacess or PHP [closed]

I have a form at index.php that takes in user input, it the includes and sends the user input to another php file for processing. Here is the code of index.php: <?php if(isset($_GET['q'])){ ...
0
votes
1answer
19 views

MVC htaccess rewrite - hide index

I have a basic MVC structure with a restful uri design of: mysite.com/appdir/:index/:controller/:action/ and I want to hide the index route parameter so my uri looks like: ...
0
votes
0answers
28 views

htaccess redirection with PHPSESSID

Could anybody help me with redirect using htaccess I'd like to do : www.some site.eu/?p=73&PHPSESSID=8448afcfa47802a65d8f451b14262b45 for any content p and different PHPSESSID to redirect ...
0
votes
0answers
31 views

Conflict with 3 different RewriteRules in .htaccess?

I'm using the below in my .htaccess file. There 3 types of redirects: redirect to directory /admin/index.php redirect to specific .php files e.g. /about redirect to user profile page from /John ...
0
votes
2answers
14 views

Reroute all links on page to localhost

I am currently doing some minor re-work on a friend's site. I have downloaded what she has currently, but all of the links are absolute links, so whenever I navigate within the locally hosted site, I ...
1
vote
1answer
28 views

.htaccess or something adds additional stuff to the URL. PHP

I just recently started to work with .htaccess on a website i'm working on. Everything works just fine, but when I try to acces the user.php file which is located on the index, I keep getting this ...
0
votes
0answers
26 views

RewriteEngine to hide extensions and GET

How can I rewrite this URL ? http://website.com/file.php?lang=en to http://website.com/file/en File name and parameters can change, I found a lot of topics put I did not found the combination of ...
0
votes
1answer
49 views

default to index.html but allow user to type to index.php and get the php page

I'm busy building a Wordpress website for a client. I've developed the site off-line and would now like to upload it to the live server to show the client what I've done so far. I want to keep the ...
1
vote
0answers
29 views

.htaccess Rewrite virtual sudomain

I am working on a site that uses virtual paths, which worked great. I have added virtual subdomains to the site and everything still works except for a non-virtual subfolder... The setup is simple ...
0
votes
1answer
39 views

Warning: Unknown: SAFE MODE Restriction in effect. The script whose uid is 10014 is not allowed to access / owned by uid 0 in Unknown on line 0

I have a site on one of those low cost web hosts and I've been having some problems with some files generating the following error: Warning: Unknown: SAFE MODE Restriction in effect. The script ...
0
votes
2answers
23 views

Apache: .htaccess ErrorDocument up one level?

my site structure like this: - pages 404.php 403.php - app /css /-script index.php .htaccess in my .htaccess if I type ErrorDocument 403 /403.php and put 403.php inside ...
0
votes
1answer
24 views

apache(php) changes .htacces chmoding and chowning. Track down the script/hole

I have virus on my site: It's behaviour is following: I have .htaccess file on my site. I set 444 to it and as owner:group site:site. But after some time it becomes owned by apache:apache and chmod ...
1
vote
2answers
27 views

.htaccess rewriterule is redirecting me to another site - why

I am trying to do some work in serve_each_drive.php under the url drive_for_london/?pid=12 this is my .htaccess: Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteRule ...

1 2 3 4 5 101
15 30 50 per page