Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #16335
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Canonical URLs, truncated URLs, redirects and SEO |
| Date | 2016-01-24 21:35 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <n83ful$5pm$1@dont-email.me> (permalink) |
| References | (3 earlier) <56A252EF.1060403@arnowelzel.de> <n7vpqq$afk$1@dont-email.me> <87si1o4f32.fsf@bsb.me.uk> <n808tl$1go$1@dont-email.me> <56a3cfcd$0$23813$e4fe514c@news.xs4all.nl> |
On 23/01/2016 19:11, R.Wieser wrote: > James, > > Although I'm not fully sure I've understood your problem I do wish to > mention something: As far as I know if a *part* of the specified web path > "lands" on a PHP file than that PHP file will be taken and executed. (I'm > not a 100% sure about if the path needs to include the ".PHP" extension > though ...) > > This means that if you have a PHP file named "/partition/ref.php" and your > webserver gets a path like "/partition/ref/scanner" than that above script > would be activated, receiving the full pathname (could be that the remainder > of the path, in your case "/scanner" can be retrieved seperatily too). > > This would mean that it becomes quite easy to have seperate PHP scripts > "translate" paths for specific folders. > > Hope that helps, > Rudy Wieser Thanks for the tip. I wasn't aware of it. I think I can avoid the problem you mention because I use URL rewriting to direct *all* URLs to a PHP script. At least, that's the intention. I have a .htaccess file in the root directory which includes the following. RewriteEngine On RewriteBase / RewriteRule .* utils/microsite.php [END] AIUI, as long as mod_rewrite or the equivalent is enabled, that will cause all Get requests to be intercepted by the PHP script. (I hadn't thought about other HTTP methods, though. Something I should check.) The PHP script is there to 1. validate the URL 2. read a configuration file 3. map the URL to a file name 4. convert the file's content to HTML The URL rewriting seems to work as intended, at least for Get requests. James
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-21 16:39 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO crankypuss <invalid@invalid.invalid> - 2016-01-21 11:22 -0700
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-22 13:58 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-21 19:16 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-22 14:03 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Richard Yates <richard@yatesguitar.com> - 2016-01-21 12:31 -0800
Re: Canonical URLs, truncated URLs, redirects and SEO Allodoxaphobia <knock_yourself_out@example.net> - 2016-01-21 22:42 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Goran <goran@nospam.com> - 2016-01-22 13:01 +0100
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-22 14:11 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Arno Welzel <usenet@arnowelzel.de> - 2016-01-22 17:03 +0100
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-23 11:59 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-23 13:09 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-23 16:17 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO "R.Wieser" <address@not.available> - 2016-01-23 20:11 +0100
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-24 21:35 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Eli the Bearded <*@eli.users.panix.com> - 2016-01-25 22:20 +0000
csiph-web