Post Reopened by John Conde
3 Made the question more clear
source | link

I'm trying to create a sitemap. I'm using the Screaming Frog software, but I think that this can be achieved in different ways with other software as well.

My links are generated with different parameters using php and they all look like example.com/content.php?id=123. I have a rewrite.php file that takes a clean url alias typed by the user (e.g. example.com/mi/nuevo/mensaje) and redirects the user to the proper ugly location.

For example:

example.com/mi-mensaje is read by the rewrite.php script and is displayed in the browser as example.com/content.php?id=523, or

example.com/mi-otro-mensaje is displayed as example.com/content.php?id=268, or

example.com/legislacion/mi-otro-mensaje is displayed as example.com/content.php?id=274

and so on...

PHP reads stuff from a MySQL database in order to know where to redirect the user.

Now, when I analyze the results with screaming frog, I am effectively told, some aliases can be indexed, getting a 200 status result, and some others cannot, getting a 301 or 302 status. The funny thing is that all aliases work the same way. They are all redirections from an ugly ...?id=X link.

  Here's as example of what I mean, here are two aliases:

Here are two aliases

In the above screenshot I am comparing the selected (green) link, with the link immediately above it. As you can see the status is different even though these 2 links work normally.

Here is the resultant output for the above highlighted link:

Here is the ok one

And here is the output for other link that I am comparing it against.

the other one non indexable

As can be seen the 2 links are generated in the exact same way, but the second link is non indexable.

In both cases they do have a redirect URL. My question is why is the first link indexable and the second not, when both links are similarly generated. Why status 200 for one link and 302 for the other? I can access both links by their clean alias.

I use a rewrite rule in my .htaccess file in order to generate the links. Each user is sent to rewrite.php and from there -and according to the parameters in the path- the correct content is shown.

Here is my .htaccess file:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./rewrite.php
</IfModule>

I'm trying to create a sitemap. I'm using the Screaming Frog software, but I think that this can be achieved in different ways with other software as well.

My links are generated with different parameters using php and they all look like example.com/content.php?id=123. I have a rewrite.php file that takes a clean url alias typed by the user (e.g. example.com/mi/nuevo/mensaje) and redirects the user to the proper ugly location.

For example:

example.com/mi-mensaje is read by the rewrite.php script and is displayed in the browser as example.com/content.php?id=523, or

example.com/mi-otro-mensaje is displayed as example.com/content.php?id=268, or

example.com/legislacion/mi-otro-mensaje is displayed as example.com/content.php?id=274

and so on...

PHP reads stuff from a MySQL database in order to know where to redirect the user.

Now, when I analyze the results with screaming frog, I am effectively told, some aliases can be indexed, getting a 200 status result, and some others cannot, getting a 301 or 302 status. The funny thing is that all aliases work the same way. They are all redirections from an ugly ...?id=X link.

Here's as example of what I mean, here are two aliases:

Here are two aliases

In the above screenshot I am comparing the selected (green) link, with the link immediately above it. As you can see the status is different even though these 2 links work normally.

Here is the resultant output for the above highlighted link:

Here is the ok one

And here is the output for other link that I am comparing it against.

the other one non indexable

As can be seen the 2 links are generated in the exact same way, but the second link is non indexable.

In both cases they do have a redirect URL. My question is why is the first link indexable and the second not, when both links are similarly generated. Why status 200 for one link and 302 for the other? I can access both links by their clean alias.

Here is my .htaccess file:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./rewrite.php
</IfModule>

I'm trying to create a sitemap. I'm using the Screaming Frog software, but I think that this can be achieved in different ways with other software as well.

My links are generated with different parameters using php and they all look like example.com/content.php?id=123. I have a rewrite.php file that takes a clean url alias typed by the user (e.g. example.com/mi/nuevo/mensaje) and redirects the user to the proper ugly location.

For example:

example.com/mi-mensaje is read by the rewrite.php script and is displayed in the browser as example.com/content.php?id=523, or

example.com/mi-otro-mensaje is displayed as example.com/content.php?id=268, or

example.com/legislacion/mi-otro-mensaje is displayed as example.com/content.php?id=274

and so on...

PHP reads stuff from a MySQL database in order to know where to redirect the user.

Now, when I analyze the results with screaming frog, I am effectively told, some aliases can be indexed, getting a 200 status result, and some others cannot, getting a 301 or 302 status. The funny thing is that all aliases work the same way.   Here's as example of what I mean, here are two aliases:

Here are two aliases

In the above screenshot I am comparing the selected (green) link, with the link immediately above it. As you can see the status is different even though these 2 links work normally.

Here is the resultant output for the above highlighted link:

Here is the ok one

And here is the output for other link that I am comparing it against.

the other one non indexable

As can be seen the 2 links are generated in the exact same way, but the second link is non indexable.

In both cases they do have a redirect URL. My question is why is the first link indexable and the second not, when both links are similarly generated. Why status 200 for one link and 302 for the other? I can access both links by their clean alias.

I use a rewrite rule in my .htaccess file in order to generate the links. Each user is sent to rewrite.php and from there -and according to the parameters in the path- the correct content is shown.

Here is my .htaccess file:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./rewrite.php
</IfModule>
    Post Closed as "Needs details or clarity" by Stephen Ostermiller
2 Exemplified the domain name according to RFC2606 (please use "example.com")
source | link

I'm trying to create a sitemap. I'm using the screaming frogScreaming Frog software, but I think that this can be achieved in different ways with other software as well.

My links are generated with different parameters using php and they all look like mywebsiteexample.com/content.php?id=123. I have a rewrite.php file that takes a clean url alias typed by the user (e.g. mysite.com/mi/nuevo/mensajeexample.com/mi/nuevo/mensaje) and redirects the user to the proper ugly location.

For example:

mywebsiteexample.com/mi-mensaje is read by the rewrite.php script and is displayed in the browser as mywebsiteexample.com/content.php?id=523, or

mywebsiteexample.com/mi-otro-mensaje is displayed as mywebsiteexample.com/content.php?id=268, or

mywebsiteexample.com/legislacion/mi-otro-mensaje is displayed as mywebsiteexample.com/content.php?id=274

and so on...

PHP reads stuff from a MySQL database in order to know where to redirect the user.

Now, when I analyze the results with screaming frog, I am effectively told, some aliases can be indexed, getting a 200 status result, and some others cannot, getting a 301 or 302 status. The funny thing is that all aliases work the same way. They are all redirections from an ugly ...?id=X link.

Here's as example of what I mean, here are two aliases:

Here are two aliases

In the above screenshot I am comparing the selected (green) link, with the link immediately above it. As you can see the status is different even though these 2 links work normally.

Here is the resultant output for the above highlighted link:

Here is the ok one

And here is the output for other link that I am comparing it against.

the other one non indexable

As can be seen the 2 links are generated in the exact same way, but the second link is non indexable.

In both cases they do have a redirect URL. My question is why is the first link indexable and the second not, when both links are similarly generated. Why status 200 for one link and 302 for the other? I can access both links by their clean alias.

Here is my .htaccess.htaccess file:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./rewrite.php
</IfModule>

I'm trying to create a sitemap. I'm using the screaming frog software, but I think that this can be achieved in different ways with other software as well.

My links are generated with different parameters using php and they all look like mywebsite.com/content.php?id=123. I have a rewrite.php file that takes a clean url alias typed by the user (e.g. mysite.com/mi/nuevo/mensaje) and redirects the user to the proper ugly location.

For example:

mywebsite.com/mi-mensaje is read by the rewrite.php script and is displayed in the browser as mywebsite.com/content.php?id=523, or

mywebsite.com/mi-otro-mensaje is displayed as mywebsite.com/content.php?id=268, or

mywebsite.com/legislacion/mi-otro-mensaje is displayed as mywebsite.com/content.php?id=274

and so on...

PHP reads stuff from a MySQL database in order to know where to redirect the user.

Now, when I analyze the results with screaming frog, I am effectively told, some aliases can be indexed, getting a 200 status result, and some others cannot, getting a 301 or 302 status. The funny thing is that all aliases work the same way. They are all redirections from an ugly ...?id=X link.

Here's as example of what I mean, here are two aliases:

Here are two aliases

In the above screenshot I am comparing the selected (green) link, with the link immediately above it. As you can see the status is different even though these 2 links work normally.

Here is the resultant output for the above highlighted link:

Here is the ok one

And here is the output for other link that I am comparing it against.

the other one non indexable

As can be seen the 2 links are generated in the exact same way, but the second link is non indexable.

In both cases they do have a redirect URL. My question is why is the first link indexable and the second not, when both links are similarly generated. Why status 200 for one link and 302 for the other? I can access both links by their clean alias.

Here is my .htaccess file:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./rewrite.php
</IfModule>

I'm trying to create a sitemap. I'm using the Screaming Frog software, but I think that this can be achieved in different ways with other software as well.

My links are generated with different parameters using php and they all look like example.com/content.php?id=123. I have a rewrite.php file that takes a clean url alias typed by the user (e.g. example.com/mi/nuevo/mensaje) and redirects the user to the proper ugly location.

For example:

example.com/mi-mensaje is read by the rewrite.php script and is displayed in the browser as example.com/content.php?id=523, or

example.com/mi-otro-mensaje is displayed as example.com/content.php?id=268, or

example.com/legislacion/mi-otro-mensaje is displayed as example.com/content.php?id=274

and so on...

PHP reads stuff from a MySQL database in order to know where to redirect the user.

Now, when I analyze the results with screaming frog, I am effectively told, some aliases can be indexed, getting a 200 status result, and some others cannot, getting a 301 or 302 status. The funny thing is that all aliases work the same way. They are all redirections from an ugly ...?id=X link.

Here's as example of what I mean, here are two aliases:

Here are two aliases

In the above screenshot I am comparing the selected (green) link, with the link immediately above it. As you can see the status is different even though these 2 links work normally.

Here is the resultant output for the above highlighted link:

Here is the ok one

And here is the output for other link that I am comparing it against.

the other one non indexable

As can be seen the 2 links are generated in the exact same way, but the second link is non indexable.

In both cases they do have a redirect URL. My question is why is the first link indexable and the second not, when both links are similarly generated. Why status 200 for one link and 302 for the other? I can access both links by their clean alias.

Here is my .htaccess file:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./rewrite.php
</IfModule>
1
source | link

Some links are indexable and some others are not when they are all created equal, why?

I'm trying to create a sitemap. I'm using the screaming frog software, but I think that this can be achieved in different ways with other software as well.

My links are generated with different parameters using php and they all look like mywebsite.com/content.php?id=123. I have a rewrite.php file that takes a clean url alias typed by the user (e.g. mysite.com/mi/nuevo/mensaje) and redirects the user to the proper ugly location.

For example:

mywebsite.com/mi-mensaje is read by the rewrite.php script and is displayed in the browser as mywebsite.com/content.php?id=523, or

mywebsite.com/mi-otro-mensaje is displayed as mywebsite.com/content.php?id=268, or

mywebsite.com/legislacion/mi-otro-mensaje is displayed as mywebsite.com/content.php?id=274

and so on...

PHP reads stuff from a MySQL database in order to know where to redirect the user.

Now, when I analyze the results with screaming frog, I am effectively told, some aliases can be indexed, getting a 200 status result, and some others cannot, getting a 301 or 302 status. The funny thing is that all aliases work the same way. They are all redirections from an ugly ...?id=X link.

Here's as example of what I mean, here are two aliases:

Here are two aliases

In the above screenshot I am comparing the selected (green) link, with the link immediately above it. As you can see the status is different even though these 2 links work normally.

Here is the resultant output for the above highlighted link:

Here is the ok one

And here is the output for other link that I am comparing it against.

the other one non indexable

As can be seen the 2 links are generated in the exact same way, but the second link is non indexable.

In both cases they do have a redirect URL. My question is why is the first link indexable and the second not, when both links are similarly generated. Why status 200 for one link and 302 for the other? I can access both links by their clean alias.

Here is my .htaccess file:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./rewrite.php
</IfModule>