Search Results

Search found 3190 results on 128 pages for 'isapi rewrite'.

Page 59/128 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • need .htaccess RewriteRule advise

    - by Abuda Dumiaty
    I've looked around for an answer to this, no luck. what i want to do is replace: http://localhost/mysite/admin/something with: http://localhost/mysite/admin/?p=something Here's the best formula I came up with since yesterday: RewriteEngine On RewriteBase /mysite/ RewriteRule ^(superv/)([^\?/]+)$ $1\?p=$2 [NC] Yet it's not working. Note: It think the "RewriteBase" thingy has nothing to do with the problem because this line is working like a charm: RewriteRule ^(javascripts/main\.js)$ $1\.php [NC] Any ideas? thanks in advance.

    Read the article

  • Redirecting only if user asks for the root of the domain nad are froma particular country

    - by lphmedia
    Hi, I need a rule and condition to handle this scenario: User from US visits www.domain.com, domain.com, www.domain.com/ or domain.com/ this should be redirected to www.domain.com/usvisitor/ However, if a user from the US visits www.domain.com/anydirectory it will let them straight through without a redirection occurring. eg. RewriteEngine On RewriteBase / GeoIPEnable On GeoIPDBFile /var/share/GeoIP/GeoIP.dat RewriteEngine on RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^US$ RewriteCond %{HTTP_HOST} ^domain.com$ [L] RewriteRule ^/$ http://www.domain.com/usvisitor$1 [L] I know the RewriteConditons and rules are wrong - just can't get my head around it!

    Read the article

  • Changing /page.php to /page/

    - by Dirge2000
    Hey there, I'm trying to change all http://www.mysite.com/filename.php files to show as http://www.mysite.com/filename/ using mod_rewrite, but I seem to be doing something wrong. Can anyone help out? I'm guessing it's something pretty simple for those that know. Thanks.

    Read the article

  • Writing a unique identifier to script?

    - by dannycab
    I'd like to write a subscript that adds a unique identifier (machine time) to a script everytime that it runs. However, each time I edit the script (in IDLE) the indetifiers are over-written. Is there a elegant way of doing this. The script that I wrote appears below. import os, time f = open('sys_time_append.py','r') lines = f.readlines() f.close() fout = open('sys_time_append.py','w') for thisline in lines: fout.write(thisline) fout.write('\n#'+str(time.time())+' s r\n') fout.close() Thanks for any help.

    Read the article

  • Remove in between folder structure from the url in a php website

    - by pabz
    I have a php website having following folder structure (basic structure). project_name app controller model view css js img index.php So when I view index.php in WAMP the url is http://localhost/project_name/ But when I go inside the site (eg. login.php which resides under view folder) url is like this. http://localhost/project_name/app/view/login.php I found that using .htaccess we can change the urls. So I tried this (in .htaccess). RewriteEngine on RewriteBase / Redirect 301 /project_name/app/view/login.php /project_name/login.php RewriteRule ^/project_name/login.php$ /project_name/app/view/login.php [L] Now url is http://localhost/project_name/login.php It is correct. But it seems php does not use the original link to grab the file (ie. from /project_name/app/view/login.php) but from here /project_name/login.php So it throws 404 error. What should I change? Please help me, i am just trying to hide /app/view/ part from the url so that user won't see my folder structure. I have read about various ways of doing that for about 9hrs today but still couldn't get anything working correctly. Hope my question is clear enough. Any help is greatly appreciated!

    Read the article

  • & symbol problem in htaccess

    - by muralikalpana
    hello.... my current url is categories_name.php?cname=at&t rewritten url like this. carriers/at&t this is htaccess url. RewriteRule ^carriers/(.*)$ categories_name.php?cname=$1 [L] above url is working for all like categories_name.php?cname=all-tel when variable(at&t) has '&' symbol then problem occuring. so how to write htaccess url?

    Read the article

  • SE friendly URLs appache code snippets

    - by Dan
    I want example.com/23-45 be transformed to example.com?id=23-45 Could you please post the code I should add to .htaccess file to make this work (Is this everything I should do to make this work - add a piece of code to .htaccess file ???) Thanks a lot!

    Read the article

  • Apache mod_rewrite replace characters in REQUEST_URI

    - by frio80
    I'm trying to write some .htaccess rules that replace certain characters in the REQUEST_URI parameter. Specifically, I want to replace the following: "<" = &lt; "" = &gt; "'" = &apos; '"' = &#x22; ")" = &#x29; "(" = &#x28; Example URL could be http://www.example.com/?<script>alert(1)</script>&q=")("<script') I've tried a whole bunch of methods with no success. Can someone point me in the right direction? Thanks.

    Read the article

  • Url rewriting : prevent to display xml

    - by Frank
    Edit : I've got an aspx file (default.aspx) that loads a flash file (index.swf), but this swf needs a xml file (foo.xml) to load correctly. However, I would like to block any request aiming directly at the xml file. Is it possible, using a rewritting engine (isapi_rewrite for example) to detect if the xml file is being 'hotlinked' or being loaded by the 'index.swf'(inside default.aspx)? Any ideas? Thank you.

    Read the article

  • the '.htaccess' file won't work on my apache server

    - by KeyStroke
    Hi, I have an Apache server installed on my windows machine using XAMPP. Now I'm trying to use a premade .htaccess file for one of my projects, but it doesn't seem to be seeing it. The project just totally ignores it, even though I've enabled mod_rewrite. Any idea how I can troubleshoot this? I can't fix it if it just doesn't work and doesn't show me any errors. Appreciate your help.

    Read the article

  • Why won't these two mod_rewrite rules work together?

    - by George Edison
    Here is what I have: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^users/(\d+)/post$ post.php [L] RewriteRule ^users/(\d+)$ user.php?id=$1 [L] The first rule doesn't work. The second one does. All I get when I enter .../users/1/post is a 404 error. What am I doing wrong? Edit: The error log doesn't have anything in it relating to this.

    Read the article

  • removing index.php of codeigniter on local

    - by Aldi Aryanto
    i'm trying to remove index.php,in my localhost, but it seems doesn't working,its on http://localhost/testing i put .htacces in 'testing' directory under the htdocs LoadModule rewrite_module modules/mod_rewrite.so at apache/conf also already uncheck here my .htaccess RewriteEngine On RewriteBase /testing/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /testing/index.php/$1 [L] here my config $config['base_url'] = "http://localhost/testing"; $config['index_page'] = ''; $config['uri_protocol'] = 'AUTO'; when i access login controller, it's not found Not Found The requested URL /testing/login was not found on this server. I really don't know what to try next. Any help would be appreciated.

    Read the article

  • Problem with .htaccess (mod_rewrite). RewriteRule's doens't work correctly

    - by daniel
    Hello, I have a problem with my two RewriteRules. .htaccess: # protect the htaccess file <files .htaccess> order allow,deny deny from all </files> RewriteEngine On Options +FollowSymlinks Options -Indexes RewriteBase /test/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^download/([0-9]+)$ download.php?id=$1 [L] RewriteRule ^(.*)$ index.php?c=view&misc=$1 [B] If the url contains download (some like this: mydomain.com/download/9) the first rule should redict this request to download.php?id=9. But it doesn't. var_dump($_GET) shows the following: array(2) { ["c"]=> string(4) "view" ["misc"]=> string(9) "index.php" } index.php Any ideas?

    Read the article

  • Url mod_rewrite for static chained pages

    - by user1121487
    How can I achieve this with mod_rewrite? from: .com/index.php?menu=home to: .com/home AND from: .com/index.php?menu=home&list=hello to: .com/home/hello ALSO (without the folder hierarki) from: .com/index.php?menu=home&list=hello to: .com/hello I'm using this for the first one: RewriteRule ^([^/\.]+)/?$ index.php?menu=$1 [L] But how to I connect them if there are multiple variables? Tried this: RewriteRule ^([^/]*)/([^/]*)?$ index.php?home=$1&list=$2

    Read the article

  • Can I suppress or enforce URLs to be prefaced with http:// in ALL browsers?

    - by Ryan Dunlap
    I want to ensure that regardless of what browser a user is in, they all see the EXACT same characters in the URL bar. Most browsers show the preceding protocol type in the URL bar. However, Chrome for example truncates http:// (not sure about https) and starts with the domain name, ie: Chrome: stackoverflow.com/questions/ask Safari: http://stackoverflow.com/questions/ask So, is there a way to either suppress the http:// in all browsers, or even enforce it in all browsers? Preferably suppress.

    Read the article

  • How to remove "index.php?" from HTACCESS [duplicate]

    - by Francis Goris
    This question already has an answer here: Reference: mod_rewrite, URL rewriting and “pretty links” explained 2 answers I have url like this: www.site.com/index.php?/genero/aventura/av/ But I would like this to be my new url: site.com/genero/aventura/av/ I used the following code: <IfModule mod_rewrite.c>RewriteEngine On RewriteCond %{HTTP_HOST} !^www.site.com/$ [NC] RewriteRule ^index.php\?/(.*)$ site.com/$1 [R=301,L] </IfModule> but only returns me: site.com/index.php?/genero/aventura/av/ This is my latest & full version: RewriteEngine on #RewriteCond $1 !^(index\.php|ver_capitulo\.html|google3436eb8eea8b8d6e\.html|BingSiteAuth\.xml |portadas|public|mp3|css|favicon\.ico|js|plantilla|i|swf|plugins|player\.swf|robots\.txt) RewriteCond $1 !^(index\.php|public|css|js|i|feed|portadas|robots\.txt|BingSiteAuth\.xml|plugins|i|mp3|favicon\.ico|pluginslist\.xml|google3436eb8eea8b8d6e\.html) RewriteRule ^(.*)$ /index.php?/$1 [L] #DirectoryIndex index.php #RewriteCond %{THE_REQUEST} http://www.page.com/index\.php [NC] #RewriteRule ^(.*?)index\.php$ http://page.com/$1 [L,R=301,NC,NE] #DirectoryIndex index.php #RewriteEngine On Thanks for reading.

    Read the article

  • Apache RewriteRule to subdirectory

    - by carin
    Hello, I need to redirect myhomepage.com/ to myhomepage.com/sub/ When I read the guide at apache.org/docs/1.3/misc/rewriteguide.html I have no clue what they are talking about. Hence I decided to friendly ask one of the experts here. I guess it takes just some seconds to figure that rule out. Thanks, Carin.

    Read the article

  • Can anyone tell me whats wrong with this htaccess code

    - by mathew
    I am not able to get through with this code...I need to capture the request but with this code I am able to redirect but it cannot find the particular search page. RewriteCond %{THE_REQUEST} ^[A-Z]+\ /searcha\.php\?name=(www\.)?([^/\ ]+)[^\ ]*\ HTTP/ RewriteRule ^.*$ http://www.mydomain.com/%2? [R=301,L] can any one tell me what is I am missing??

    Read the article

  • mod_rewrite: check if isn't a certain domain

    - by weingage
    I'm migrating some code from a working web app, but can't get it to work on the new server. Everything seems to be configured correctly, but I'm getting internal redirect limit errors in Apache2. Here are my rewrites and explanation This WORKS - any subdomains that aren't cdn. or manage. should be redirected to u.php RewriteCond %{HTTP_HOST} ^(^.*)\.mediasprk\.com$ [NC] RewriteCond ^(.*)$ !^(cdn|manage)$ RewriteCond %{REQUEST_URI} !\.(png|gif|jpg)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ u.php?uri=$1&hostName=%{HTTP_HOST} This is no longer working. Goal here is to handle CName pointing. So if it's not my app domain (mediasprk.com), then handle it by sending it to u.php. RewriteCond %{HTTP_HOST} !^mediasprk\.com$ [NC] RewriteCond %{REQUEST_URI) !\.(png|gif|jpg)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ u.php?uri=$1&hostName=%{HTTP_HOST} Can anyone see the issue here in the second block that would cause the redirect limit errors? Maybe something wrong in the rewrites? Thanks.

    Read the article

  • Apache mod_rewrite help with Wordpress

    - by protohominid
    I administer my wife's site, namelymarly.com. Up until last week, the root page of the blog was namelymarly.com/blog/. Last week I changed it in the WP settings to be namelymarly.com. WP created the new htaccess file, and I moved the index.php to the root directory (but left the WP folder where it was in the /blog/ directory), as instructed. Everything is working great except for one very important thing: When you type 'namelymarly.com/blog/' into a browser now, you get a 404 error. All other URLs, when they include the '/blog/somethinghere', will redirect properly to '/somethinghere.' It's only when there's nothing after '/blog/' that there's a problem. I tried adding this rule but it breaks the site: RewriteRule ^/blog(/|)$ / Any suggestions/help?

    Read the article

  • Placing .htaccess file in var/www folder messes my website up...

    - by Camran
    I am playing with mod_rewrite now, and have successfully enabled it. However, I need to put a htaccess file inside var/www/ in order to achieve what I want, which is to rename Urls simply... When I place it my website becomes very strange and nothing basically works... Is there any code I need to put into the htaccess file in order for things to act normally? Here is the htaccess file I have so far: Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteCond %{REQUEST_URI} !^/ad\.php RewriteRule ^(.*)$ ad.php?ad_id=$1 [L] My DocumentRoot is also set to var/www/ and my entire website root is there... (index.html etc etc)... What am I missing about the htaccess? If you need more input let me know...

    Read the article

  • Need help with regular expressions - URL redirection

    - by paperless
    Hello everyone. I'm trying to redirect an easy to remember url to a php file but I'm having some trouble with the regex. Here's what I have at the moment: RewriteRule ^tcb/([a-zA-Z0-9]{1,})/([a-zA-Z0-9]{1,})/([a-zA-Z0-9]{1,}) /tcb/lerbd.php?autocarro=$1&tipo=$2&dsd=$3 It is working but only if I supply all 3 arguments. I want the last two arguments to be optional so it either works with only the first or all three. I'm hoping you can help me with this. Thank you very much.

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >