1
голосов
2ответов
1141 просмотров

Redirect all page requests to one page

I need to redirect all page requests (php, if that matters) on a specific domain to a specific page (again, php) on that domain. I'm looking for a .htaccess, mod_rewrite solution for easy of implementation.

3
голосов
3ответов
4401 просмотров

mod_rewrite passing variables

I have the following mod_rewrite rule: RewriteRule ^([^/.]+)/?$ search.php?action=procedure&procedureName=$1 This works fine in redirecting things like /blabla to /search.php?action=procedure&procedureName=blabla The problem is that sometimes I want to pass a 'start' value (for pagina...

0
голосов
1ответов
538 просмотров

how to? mod_rewrite in different .htaccess files per folder move into vhost.conf - mvc

I hope I will find a help here. I have a quite complex MVC driven application. Here how it works: these are my directories / - (/dispatcher.php as mvc1 app bootstrap) /mvc2 - (/mvc2/dispatcher.php as mvc2 app bootstrap) /mvc3 - (/mvc3/dispatcher.php as mvc3 app bootstrap) all 3 are accesib...

2
голосов
2ответов
631 просмотров

How can I alias a path to another without the user knowing that path?

I thought I could do this with rewrite but I can't seem to find any information on it. What I want to do is this. /path/to/my/program/index.php I want to use a link for the use such as. /forum/index.php Is this posible?

0
голосов
1ответов
245 просмотров

mod_rewrite: periods from URI gone in the query string

Problem: See examples below. When using mod_rewrite to put "the URI part after the script name" into the query string (in any way), the ending periods (.) of every "directory" are removed. (Apache 2.2.14 on win32.) Question: Is there any way to solve this or do I have to parse REQUEST_URI? Requ...

3
голосов
1ответов
2130 просмотров

Reaching files outside od the documentroot scope

I'm writing a script to build a dynamic website, the website is created by loading external components. The DocumentRoot is location at /sites/website/public the components directory is located at /sites/website/components i wannna reach the data directory of each component depends on the reque...

1
голосов
2ответов
5610 просмотров

Rewrite URLs for static content

I have problems with static files url rewriting in current .htaccess setup on apache2. My app structure is: /siteroot /siteroot/app /siteroot/lib /siteroot/... /siteroot/public <- all the static files (images, js, etc.) stored here /siteroot/index.php /siteroot/.htaccess So, i need to rewr...

2
голосов
1ответов
10866 просмотров

Pointing a subdomain to a subfolder using .htaccess

My webhost automatically forwards all requests to *.mydomain.com to the toplevel domain mydomain.com. I wanted to map any subdomain to a specific folder on my toplevel domain. i.e. sub.example.com must be mapped to example.com/someFolder (without change in the address bar). After digging around...

0
голосов
2ответов
208 просмотров

mod_rewrite needed

lets says I have a domain example.com and I have wildcards dns switched on. on example.com a user can signup with username and password. once registration is done, username.example.com starts redirecting to example.com/script/script.php?user=username. address bar would still show username.example...

0
голосов
2ответов
1242 просмотров

mod_rewrite rewrite all but index.php

In my htaccess i have RewriteRule ^([^/]+)/?$ cms.php?seotitle=$1 [L] The idea is that index.html will load fine and then anything requested at domain.com/anythinghere.html will use the rule of grabbing the file from cms.php. However its not working - any clues? Really need this sorted asap.

0
голосов
3ответов
533 просмотров

How to use RewriteRule in Apache to redirect from /abc/ to /abc?

RewriteRule ^([^/\.]+)/$ $1 [R] redirects from website.com/abc/ to website.com/home/user/www/abc How do I redirect to the correct location? (website.com/abc)

2
голосов
2ответов
5763 просмотров

Using mod_rewrite only if a 404 would have occured

I am in the process of converting a static website into one using a cms. I have the cms installed in a sub directory of the public directory. To avoid ending up with ugly domain names (http://example.com/cms/) is there an easy way using mod_rewrite to rewrite http://example.com/… to http://exampl...

2
голосов
2ответов
187 просмотров

REALLY basic mod_rewrite question

I am trying to use SEO-friendly URLs for a website. The website displays information in hierarchical manner. For instance, if my website was about cars I would want the URL 'http://example.com/ford' to show all Ford models stored in my 'cars' table. Then the URL 'http://example.com/ford/explor...

1
голосов
1ответов
523 просмотров

Using mod_rewrite to bypass an "invalid SSL cert" error

I have a certificate that is registered to the fully qualified domain name of a server on our intranet (webserver.domain.com). When our internal users hit this site via the fully qualified name, they go right in and aren't prompted that it's an invalid cert. If they browse to the web server vi...

1
голосов
2ответов
563 просмотров

Complex htaccess rewrite rules - where do i start?

I have asked on here before about mod_rewrite and got the perfect answer but now I need to do something more complex and really needed the advice of someone who knows mod_rewrite much better. My rewrite rule looks like this so far: RewriteRule ([a-zA-Z_-]+)/([0-9]?) index.php?cat=$1&page=$2...

0
голосов
2ответов
4629 просмотров

htaccess rewriteRule restrict access to one particular folder problem

I have problem with getting the folder inc restricted. It is only the inc folder in the root directory and not the inc folders higher up de hiarchie Problems are: IE will start a download/open dialog and FF displays an include file I don´t have this problem with the images folder wich is ...

1
голосов
2ответов
172 просмотров

How can I rewrite URLs?

I want to convert this URL: mysite.com/cgi-bin/test.cgi/some_random_numbers_and_letters/http/www.somewebsite.com into: mysite.com/www.somewebsite.com I also want to convert this URL: mysite.com/addname.php into: mysite.com/add/ How do I do that?

0
голосов
1ответов
91 просмотров

Using PHP how do I make a rewrite rule?

Using mod rewrite for the first time. Please help me with these rules I'd like my urls rewritten for pages as follows: list.php?city=dallas>>> list/city/dallas profile.php?id=12>>> profile/zaknuman (username retrieved from db) story.php?id=33>>> story/there-are-no-a...

0
голосов
1ответов
1187 просмотров

Redirect specific file request (at any location) to specific location

I have a specific file, let's call it 'myfile.abc', that I need to have redirected to a specific location, no matter what location it's requested from. For instance: /folder1/myfile.abc /folder2/myfile.abc /folder3/myfile.abc I need all the above to be redirected to (as an example): /myfolder...

2
голосов
1ответов
88 просмотров

creating a default variable in mod_rewrite

I have mod_rewrite take this url: mydomain.com/directory/index.php?slug=slug&year=2009 and make it pretty: mydomain.com/directory/slug/2009/ Easy, but now my issue is, if someone lands at the URL without the year attached (like: mydomain.com/directory/slug/), how can I add the current y...

3
голосов
1ответов
18043 просмотров

Apache mod_rewrite issue with WAMP - shows Error 404 Not found - Joomla 1.5.14 with SEF URL

I am newbie to Joomla and WAMP environiment. I am using WAMP environment: Win Srv 2003 R2 (Std Ed) with SP2 and all recent updates Apache 2.2.9 PHP 5.2.6 Joomla 1.5.14 I want to enable mod_rewrite with Joomla SEF URL but it is not working together. If I set 'SEF URLs' and 'Add suffix to UR...

1
голосов
2ответов
891 просмотров

mod rewrite causing error with pretty urls in SMF forum

I installed a mod (pretty urls) to rewrite the urls of this SMF forum and it works for all the boards except this one: http://mmaturf.com/forum/genghis-con's-turf/ I believe it has to do with apostrophe, but my mod rewrite skills are negligible. The rule that was created looks like this: # Ru...

2
голосов
1ответов
1170 просмотров

mod_rewrite or path_info for clean URLs

I have always used mod_rewrite for creating clean looking URLs, until recently I didn’t know there was any other option. A few weeks back someone on here pointed out that exactly the same effect can be achieved using apache PATH_INFO. Thinking about it now, I assume this is what most PHP framewor...

0
голосов
3ответов
1078 просмотров

How to encode URL in Apache mod_rewrite?

I'm now doing it this way: rewriterule ^questions/tagged/(.*) qas.php?q=[$1] Which didn't do encoding stuff yet.

0
голосов
3ответов
242 просмотров

How to prevent rewriting href attributes when rewriting urls?

on my web site i want to change url's from (just exemple): site.com/showCategory.php?catId=34 to: site.com/category/34/ Here is the contents of my .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^affichage/([0-9]+)$ /affichage/$1/ [R] RewriteRule ^af...

2
голосов
2ответов
6274 просмотров

Htaccess, mod_rewrite and regular expression for alphanumeric and dashes only

Just can't figure aout those regular expressions. I have an .htaccess file with some url rewrites. Look below what I have now: RewriteRule ^news news/ [R] RewriteRule ^news/([-A-z0-9]+)/$ news/$1 [R] RewriteRule ^news/([-A-z0-9]+)$ index.php?news=$1 [L] I don't think this is correct, I mean I...

1
голосов
2ответов
4248 просмотров

mod-rewrite problem in codeigniter

I'm developing a site on my localhost (Usbwebserver application). I'm using CodeIgniter framework: url is "http://localhost/daniel/index.php" with the following options: config/routs: $route['default_controller'] = "site"; config/config: $config['base_url'] = "http://localhost/daniel"; $c...

0
голосов
2ответов
257 просмотров

Apache ReWrite rule stopping portions of our app

Our application uses rewrite rules in our PHP application and our developer added these rewrite rule to our Apache VHosts file: I have updated our Rewrite rules based on suggestion below. Currently my VHosts file configuration looks like this: RewriteCond %blog !-d RewriteRule ^/([a-zA-Z0-9-...

0
голосов
1ответов
1289 просмотров

lighttpd mod_rewrite all

i need an regex to do the following: redirect EVERY request to the index.php if there are get parameters in the url i need to access them with $_GET[] (php) My (not complete) solution is: url.rewrite-once = ( ".*\?(.*)$" => "/index.php?$1&full_request=$0" ) But the error here is ...

2
голосов
2ответов
2351 просмотров

CodeIgniter - How Do I Rewrite URLs with URL Parameters

I need to turn URL's such as the following: /catalog/products/24 into cleaner URL's such as the following: /catalog/product-name-here I'm using CodeIgniter, and rewrite engine is on and setup. I also setup rewriting in the routes.php file as follows: $route['catalog/products/(:any)'] = 'ca...