Search Results

Search found 906 results on 37 pages for 'rewriteengine'.

Page 11/37 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Url rewriting issue

    - by Suriyan Suresh
    i have used the following code in .htaccess Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteRule ^company/aboutus$ aboutus.php [NC,L] RewriteRule ^company/contactus$ contactus.php [NC,L] RewriteRule ^company/careers$ careers.php [NC,L] RewriteRule ^/$ index.php [NC,L] the above code works but aboutus page loading without any css and images. no company folder, i have used company word for url redability

    Read the article

  • Rule not redirecting .co.uk to .com

    - by bateman_ap
    I have been trying to get my site, when a visitor goes to .co.uk to be automatically redirected to .com. As well as if they go to domain.com to be taken to www.domain.com I have the code below in my httpd.conf, it appears to be working with domain.com to www.domain.com but not domain.co.uk or www.domain.co.uk to www.domain.com RewriteEngine on RewriteBase / RewriteCond %{http_host} ^domain.com [NC,OR] RewriteCond %{http_host} ^domain.co.uk [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,NC]

    Read the article

  • mod_rewrite issues

    - by ayyappan
    I have used the mod_rewrite module but was not able to redirect to the target page - I am getting an error: The requested URL /old.html was not found on this server. Rewrite rules as follows: RewriteEngine On RewriteRule ^/IN/index.html$ /IN/index.iface [L]

    Read the article

  • help with htaccess

    - by Matías
    I want to do this: foo.com/xxx= foo.com/somepage.php?id=xxx This is how I do it: Options +FollowSymLinks RewriteEngine On RewriteCond %{QUERY_STRING} ^$ RewriteRule ^([^/]+)$ http://foo.com/somepage.php?id=$1 [L] the problem now, is that foo.com doesn't work any more. I can't see foo.com neither foo.com/index.php help me! :)

    Read the article

  • .htaccess problem adding www to the url and removing index.php

    - by ricky
    I'm not sure why my code doesn't work. I want to add www to the url and when they enter http://domain.co.uk/index.php it will become http://www.domain.co.uk/ only here is my htaccess code: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^domain.co.uk [NC] RewriteRule ^(.*)$ http://www.domain.co.uk/$1 [L,R=301] RewriteRule index\.php http://www.domain.co.uk/ [NC,R] </IfModule>

    Read the article

  • htaccess rewrite rule not loading site content

    - by peter
    I am struggling with .htaccess rewrite rules. Let's say I have this URL. localhost/site/index.php and I want to rewrite it as this URL localhost/site/tutorial I would use this RewriteRule Options +FollowSymLinks RewriteEngine on RewriteRule ^tutorial/(.*)$ /up/index.php The page works, but the CSS files don't load. Also, if I have a URL like this: index.php?page=home Then I would have to parse through that URL to get 'home' not using $_GET anymore correct??

    Read the article

  • What is wrong with my .Htaccess file? I'm trying to redirect permanently my whole site to the index.

    - by SocialAddict
    This is giving me a 500 internal server error. Any suggestions? I have tried various examples but I think I'm missing something... RewriteEngine On RewriteCond %{request_uri}!^/index\.htm RewriteRule ^(.*)$ http://www.thedomain.co.uk [R=permanent,L] It displays the homepage if I navigate there but anything that meets the conditions (all appart from index.htm gives the server 500)

    Read the article

  • once more: .htaccess - RewriteRules working, but browser address bar displaying full (unfriendly) URL

    - by audio.zoom
    Hi, I can't seem to find my problem with this really simple .htaccess file: Options -Indexes Options +FollowSymLinks RewriteEngine on RewriteBase /d/ #drupal style url rewriting RewriteRule ^([^.]*)$ index.php?path=$1 [L] It works as intended for everything except the root url with no slash. So it rewrites and passes the hidden get querystring to my pages for localhost/d/x/y/z as ?path=x/y/z and localhost/d/ as ?path= (blank) but... localhost/d works, but now appears in the address bar as this ugly monster: http://localhost/d/?path=/Users/audiozoom/Documents/webroot/d What could be the problem?

    Read the article

  • htaccess redirect *.domain.com to www.domain.com/index.php

    - by decimal
    I want to redirect a user to www.domain.com/index.php if they type in either: domain.com or www.domain.com. I'm clueless about htaccess. Here's what I found but I don't know how to write an OR statement for the www. redirect RewriteEngine on RewriteCond %{HTTP_HOST} ^domain\.com RewriteRule (.*) http://www.domain.com/index.php$1 [R=301]

    Read the article

  • Rewrite Trailing Slash Issue

    - by James Jeffery
    Here is my .htaccess file Options +FollowSymlinks RewriteEngine on ErrorDocument 404 /404.php RewriteRule ^(\d*)/(.*) /page.php?id=$1&slug=$2 It all works fine. But the moment I type site.com/342/my-page/ (with the trailing slash) I get a 404. I need the trailing slash as optional. I.e it will redirect to the correct page with or without the slash. I tried this, but it didn't work RewriteRule ^(\d*)/(.*)/?$ /page.php?id=$1&slug=$2 Any ideas?

    Read the article

  • .htaccess mod_rewrite issue

    - by Orhan Toy
    Almost in any project I work on, some issues with .htaccess occur. I usually just find the easiest solution and leave it because I don't have any knowledge or understanding for Apache, servers etc. But this time I thought I would ask you guys. This is the files and folders in my (simplified) setup: /modrewrite-test .htaccess /config /inc /lib /public_html .htaccess /cms /navigation index.php edit.php /pages index.php edit.php login.php page.php The "config", "inc" and "lib" folders are meant to be "hidden" from the root of the website. I try to accomplish this by making a .htaccess-file in the root that redirects the user to "public_html". The .htacess-file contains this: RewriteEngine On RewriteRule (.*) public_html/$1 This works perfect. If I type "http://localhost/modrewrite-test/login.php" in my browser, I end up in public_html/login.php which is my intention. So this works fine. The .htaccess-file in "public_html" contains this: RewriteEngine On # Root RewriteRule ^$ page.php [L] # Login RewriteRule ^(admin)|(login)\/?$ login.php [L] # Page (if not a file/directory) RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ page.php?url=$1 [L] The first rewrite just redirects me to public_html/page.php if I try to reach "http://localhost/modrewrite-test/". The next rewrite is just for the convenience of users trying to log in - so if they try to reach "http://localhost/modrewrite-test/admin" or "http://localhost/modrewrite-test/login" they will end up at the login.php-file. The third and last rewrite handles the rest of the requests. If I try to reach "http://localhost/modrewrite-test/bla/bla/bla" it will just redirect me to public_html/page.php (with the 'url' GET-variable set) instead of finding a folder called "la", containing a folder named "bla" and etc. All of these things work perfect but a minor issues occurs when I for instance try to reach "http://localhost/modrewrite-test/cms/navigation" without a slash at the end of the URL. When I try to reach that page the browser is somehow redirected to "http://localhost/modrewrite-test/public_html/cms/navigation/". The correct page is shown but why does it get redirected and add the "public_html" part in the URL? The desired behavior is that the URL stays intact and that the page public_html/cms/navigation/index.php is shown. The files and folders in the (simplified) can be found at http://highbars.com/modrewrite-test.zip

    Read the article

  • Porblem with remove trailing slash and non-www to www - using .htaccess

    - by HoanNguyen
    I'm facing an issue with .htacess when combining 2 mod_rewrite at the same time: remove trailing slash redirect non-www to www Here is my .htaccess file Options +FollowSymLinks RewriteEngine On RewriteBase / # Redirect non-www to www RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC] RewriteRule ^(.+)/$ http://www.domain.com/$1 [R=301,L] # Remove trailing slash RewriteCond %{HTTP_HOST} ^domain.com RewriteRule (.*) http://www.domain.com/$1 [R=301,L] They worked perfectly when I just used one of them, but when i put them together, the page just keep loading like forever. Please help me to find a way that can use both of them in the same .htaccess :( Many thanks :)

    Read the article

  • How do I deny access to invalid web subdomains with .htaccess?

    - by Gravitas
    The following .htaccess file does not work: SSLrequireSSL RewriteEngine on RewriteCond %{HTTP_HOST} !^secure\.neuralfutures\.com [NC] RewriteRule (.*) - [F] I'm trying to prevent access to anything but "https://secure.neuralfutures.com/docs/", i.e. "https://www.neuralfutures.com/docs/" will fail. I also seem to be running into caching issues: if I upload the new .htaccess with CuteFTP, then do a file refresh in FireFox, it doesn't seem to have any effect on the output at all. I can tell this because if I comment out SSLrequireSSL, it still disallows a http:// request.

    Read the article

  • site not working with url www

    - by jarus
    hello im having problem with my site when i type http://mysite.com it works fine but when i type http://www.mysite.com it displays page cannot be found , what is the problem i couldnot find , i tried .htaccess redirection also RewriteEngine On RewriteCond %{HTTP_HOST} ^www.mysite.com [nc] RewriteRule (.*) mysite.com/$1 [R=301,L] it is not working any help will be appreciated

    Read the article

  • Mod redirct error.

    - by user150253
    when I used the SSL fot my website i got following error. in error log. and site shows me default page instead of actual page. I got following error. .htaccess: RewriteEngine not allowed here

    Read the article

  • Rewriting URLs with mod_rewrite

    - by Webby
    Hey guys, I'm currently rewriting urls from http://domain.com/profile/?u=10000017564881 this to this http://domain.com/profile/10000017564881 with the following rewrite RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*?)\/?$ index.php?u=$1 [L] However I'd like to optimize for seo a litte and go with : http://domain.com/profile/10000017564881/Anything-I-want-here Obviously the /Anything-I-want-here is just null ignored ... Any idea's guys? much appreciated

    Read the article

  • Rewrite URL if file exists

    - by Anthony Faull
    I need to redirect web requests of the form /{language}-{country}/{file} to: /{language}-{country}/{file} if it exists, otherwise /{language}/{file} if it exists, otherwise /en-US/{file} The existing .htaccess fulfils requirements 1 and 3. What changes do I need to fulfil requirement 2? .htaccess: Options +FollowSymLinks RewriteEngine On RewriteCond $0 !i18n/en-US [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(i18n)/([^/]+)/(.*)$ $1/en-US/$3 [NC,L]

    Read the article

  • What's wrong with this .htaccess rewrite

    - by titel
    Hi guys, I spend a lot of time trying to figure out what's wrong with this .htaccess rewrite with no success. It produces a "500 Internal Server Error" :( RewriteEngine On RewriteCond %{REQUEST_URI} ^/(([^/]+/)*)gallery/ RewriteCond %{DOCUMENT_ROOT}%1gallery/cache/$0 -f RewriteRule ^.+ cache/$0 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^.* index.php/$0 [L] Can anyone see any problem? Thanks in advance, Constantin TOVISI

    Read the article

  • Mod_rewrite Help !

    - by lixon
    RewriteEngine on Rewriterule ^(.*).htm $1.php This works fine when i try to access every php page But how could i make it RewriteRule ^/somepage $ /somepage.php (its not working ) if the page is about.php the url should be about/ (directory type) Please help me . Thanks in advance!

    Read the article

  • Am I missing a flag or something? RewriteRule tip needed

    - by Kirill
    RewriteEngine On RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ index.php?p=$1&l=$2 RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/$ index.php?p=$1&l=$2 this works fine if I do site.com/param_one/param_two/, but returns a 404 when I omit param_two. I'm a newbie to routing requests with htaccess, is there a simple quick fix?

    Read the article

  • .htaccess rewrite not working

    - by snumb130
    I need help with a rewrite in .htaccess. I am trying to do the following: When a user types http://www.example.com/csc/alabama/ I need to pull info from http://www.example.com/csc/index.php?state=alabama I thought it should be this Options +FollowSymLinks RewriteEngine On RewriteRule ^csc/([^/]*)$ /csc/index.php?state=$1 [L] I keep getting a 404 error. On a side note, I would like to be able to do this with a generic sub-directory, so that csc could be abc or anything else but this is not the priority.

    Read the article

  • Redirect Old urls to new urls via htaccess

    - by Thorpe Obazee
    I currently have a bunch of urls to redirect to their new urls: I basically have to remove 'blog' from the start and add the 'uri' in there: redirect 301 /blog/posts/view/follow-twitter http://domain.net/posts/view/uri/follow-twitter redirect 301 /blog/posts/view/around-the-corner http://domain.net/posts/view/uri/around-the-corner This is the rest of the .htaccess I have: Options +FollowSymLinks IndexIgnore */* RewriteEngine on # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # otherwise forward it to index.php RewriteRule . index.php

    Read the article

  • Redirecting via .htaccess to .php with arguments in current folder.

    - by Jengerer
    Hey, I'm trying to redirect something like foo/bar to ?foo=bar, so I can do www.mydomain.com/hey/foo/bar to www.mydomain.com/hey/?foo=bar, but I can't seem to get the syntax right. I tried the following: RewriteEngine on RewriteRule ^foo/(.*)$ ?foo=bar [NC] But this doesn't work. How would I accomplish this? I tried adding a forward slash behind the question mark, but that makes it link to the root directory. Thanks, Jengerer

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >